diff options
author | Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> | 2025-02-01 12:38:57 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2025-02-03 15:17:02 +0100 |
commit | cb3fd788e3fa5358602a49809c4eb4911539c9d0 (patch) | |
tree | bc812672cd7182184a849451a9aa80396f84c2dc /tools/perf/scripts/python/export-to-postgresql.py | |
parent | abdbf8764f4962af2a910abb3a213ecf304a73d3 (diff) |
HID: pidff: Completely rework and fix pidff_reset function
Previously, it was assumed that DEVICE_CONTROL usage is always an array
but a lot of devices implements it as a bitmask variable. This led to
the pidff_reset function not working and causing errors in such cases.
Selectors can come in three types. One selection of a set, N selections
and Any selection in form of bitmask as from USB Hid Usage Tables v1.5,
subsection 3.4.2.1
Added pidff_send_device_control which handles usage flag check which
decides whether DEVICE_CONTROL should be handled as "One selection of a
set" or "Any selection of a set".
Reset was triggered once, on device initialization. Now, it's triggered
every time when uploading an effect to an empty device (no currently
stored effects), tracked by pidff->effect_count variable.
Co-developed-by: Makarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: Makarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: Michał Kopeć <michal@nozomi.space>
Reviewed-by: Paul Dino Jones <paul@spacefreak18.xyz>
Tested-by: Paul Dino Jones <paul@spacefreak18.xyz>
Tested-by: Cristóferson Bueno <cbueno81@gmail.com>
Tested-by: Pablo Cisneros <patchkez@protonmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions