diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-08-03 11:46:34 -0700 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-08-14 14:46:21 +0200 |
| commit | ce75845b69c7f628491e15a15cbcd4e7bfa6ae1b (patch) | |
| tree | c2e967dc98b3f49d0d46175ed3848ea717bfe62a /tools/perf/scripts/python/stackcollapse.py | |
| parent | 37f6ca4369ae15d1decb38646161929c289d0682 (diff) | |
HID: stadia: use open/close to manage workqueue lifecycle
Override input device open() and close() callbacks to enable and disable
the force-feedback workqueue item synchronously.
When the input device is opened by userspace, call hid_hw_open() and
enable_work(). When it is closed, disable_work_sync() ensures that any
pending or running work item is cancelled/flushed and no further work
items can be scheduled.
In close(), zero out magnitudes and issue a final report to turn off the
rumble motors on the physical controller before shutting down transport
I/O.
Pack strong and weak magnitudes into a single u32 integer using
WRITE_ONCE() and READ_ONCE() for atomic, lockless updates.
This allows eliminating the manual 'removed' boolean flag and spinlock
completely.
Assisted-by: Antigravity:gemini-3.6-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
