OSDN Git Service

HID: wacom: Only report rotation for art pen
authorPing Cheng <pinglinux@gmail.com>
Fri, 13 May 2022 21:51:56 +0000 (14:51 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 27 May 2022 07:05:31 +0000 (09:05 +0200)
commit7ccced33a0ba39b0103ae1dfbf7f1dffdc0a1bc2
treeab17a5773428e83e725114a528dde97a447854a4
parentaa051d36ce4ae23b488489f6b15abad68b59ca23
HID: wacom: Only report rotation for art pen

The generic routine, wacom_wac_pen_event, turns rotation value 90
degree anti-clockwise before posting the events. This non-zero
event trggers a non-zero ABS_Z event for non art pen tools. However,
HID_DG_TWIST is only supported by art pen.

[jkosina@suse.cz: fix build: add missing brace]
Cc: stable@vger.kernel.org
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
--
Hi Jiri,

This is kind of a version 2 of the last one I posted two days ago.
I updated the logic so it has less changed lines: 29 vs 158! Hopefully,
the logic is easier to follow now. Please ignore the last one.

Thank you!
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c