]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Detect and correct descriptors missing HID_DG_BARRELSWITCH2
authorJason Gerecke <killertofu@gmail.com>
Thu, 20 Oct 2016 01:03:40 +0000 (18:03 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 20 Oct 2016 07:53:56 +0000 (09:53 +0200)
commit013d628bd578c07dcd5eaf045dbaa0b6b84809ae
tree8e38f20d8a260c307311535a7db13e1d46c3088b
parentcc8510b57b22be74a2e57b950bf974b7ac06a6ed
HID: wacom: Detect and correct descriptors missing HID_DG_BARRELSWITCH2

ISDv4 devices have long supported reporting data from each of two barrel
switches, but HID_DG_BARRELSWITCH2 itself was only recently standardized.
Prior to its adoption, ISDv4 devices would associate the bit indicating
the state of the second barrel switch with the "Undefined" 0x000D0000
usage. Although most such devices have explicit support, a few use the
HID_GENERIC codepath which ignores the "Undefined" usage.

This patch adds code which detects the presence of a pre-standard second
barrel switch and corrects the usage value so that the HID_GENERIC code
will declare its presence and report its state.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c