HID: wacom: Correct coordinate system of touchring and pen twist
authorJason Gerecke <killertofu@gmail.com>
Wed, 30 Aug 2017 22:13:26 +0000 (15:13 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 6 Sep 2017 09:01:19 +0000 (11:01 +0200)
commitd252f4a10fb9c8f7187c6c936ff530039f8cb799
treec728c8d48a39d9030547daaa5d77e4b254300772
parentb63c4c2718d641ba9bec888994f0cb0c23a1ef45
HID: wacom: Correct coordinate system of touchring and pen twist

The MobileStudio Pro, Cintiq Pro, and 2nd-gen Intuos Pro devices use a
different coordinate system for their touchring and pen twist than prior
devices. Prior devices had zero aligned to the tablet's left and would
increase clockwise. Userspace expects data from the kernel to be in this
old coordinate space, so adjustments are necessary.

While the coordinate system for pen twist is formally defined by the HID
standard, no such definition existed for the touchring at the time these
tablets were introduced. Future tablets are expected to report touchring
data using the same "zero-up clockwise-increasing" coordinate system
defined for twist.

Fixes: 50066a042d ("HID: wacom: generic: Add support for height, tilt, and twist usages")
Fixes: 4922cd26f0 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
Fixes: 60a2218698 ("HID: wacom: generic: add support for touchring")
Cc: stable@vger.kernel.org # 4.10, 4.11
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c