]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Do not completely map WACOM_HID_WD_TOUCHRINGSTATUS usage
authorJason Gerecke <killertofu@gmail.com>
Fri, 4 Aug 2017 22:35:14 +0000 (15:35 -0700)
committerJiri Kosina <jkosina@suse.cz>
Tue, 8 Aug 2017 08:10:26 +0000 (10:10 +0200)
commit7498052e4c5dfe48f3fb34043568b936ac237614
treeb19b1b5ab287b74ab24a2f1b7247b0aa72203943
parent127fc94ec3689b71d1b9c7a3c3c92c68b45a357d
HID: wacom: Do not completely map WACOM_HID_WD_TOUCHRINGSTATUS usage

The WACOM_HID_WD_TOUCHRINGSTATUS usage is a single bit which tells us
whether the touchring is currently in use or not. Because we need to
reset the axis value to 0 when the finger is removed, we call
'wacom_map_usage' to ensure that the required type/code values are
associated with the usage. The 'wacom_map_usage' also sets up the axis
range and resolution, however, which is not desired in this particular
case.

Although xf86-input-wacom doesn't do really do anything with the ring's
range or resolution, the libinput driver (for Wayland environments)
uses these values to provide proper angle indications to userspace.

Fixes: 4b68c6cdb0 ("HID: wacom: generic: add support for touchring")
Cc: stable@vger.kernel.org
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c