]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: pidff: Add support for AXES_ENABLE field
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Wed, 13 Aug 2025 20:09:56 +0000 (22:09 +0200)
committerJiri Kosina <jkosina@suse.com>
Fri, 15 Aug 2025 13:58:02 +0000 (15:58 +0200)
commit1d72e7bd340b552160df0baca1a85fd1992abe49
tree443bc0c4a2d66a5f31153143d6624dfa3695f2fd
parentb974b372a9b0aa409ccf05dae8a267d4486f37b4
HID: pidff: Add support for AXES_ENABLE field

AXES_ENABLE can be used in place of DIRECTION_ENABLE to indicate, which
FFB-enabled axes will be affected by a given effect. EFFECT_DIRECTION
enables all and uses the first direction only while AXES_ENABLE is a
bitmask and bit indexes are the same as the defined GD usages in the
EFFECT_DIRECTION array. Each axis can have it's own direction in this
case.

Search for AXES_ENABLE, set AXES_ENABLE for all axes if DIRECTION_ENABLE
is not used.

Search for specific axes in the direction array. Save their indexes. This
let us know what axes are actually available on the device and which bit
in the AXES_ENABLE field corresponds to which axis.

Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-pidff.c