HID: wacom: generic: Add support for vendor-defined "Distance" usage
authorJason Gerecke <killertofu@gmail.com>
Thu, 20 Oct 2016 01:03:44 +0000 (18:03 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 20 Oct 2016 07:53:57 +0000 (09:53 +0200)
commitb5c921e6c3916cdadd6e605d792f811abf7a5f82
treea48d0f6c04eaba605ef8ea9bd71bc5b587f75bf1
parentc9c095874ab4446be6dec6755d8f68862fdeae48
HID: wacom: generic: Add support for vendor-defined "Distance" usage

The vendor-defined 0xFF0D01032 ("Distance") usage is nearly equivalent to
HID_GD_Z, except that the axis direction is inverted. Unlike HID_GD_Z which
increases in value as the pen-to-surface distance is decreased, this usage
decreases. Treat this usage as a special case to ensure we don't invert the
scale to be ABS_DISTANCE compatible like we do for HID_GD_Z.

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_wac.c
drivers/hid/wacom_wac.h