]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/hid/wacom_wac.c
HID: wacom: Introduce a new WACOM_DEVICETYPE_PAD device_type
authorJason Gerecke <killertofu@gmail.com>
Tue, 16 Jun 2015 01:01:43 +0000 (18:01 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 18 Jun 2015 08:42:39 +0000 (10:42 +0200)
commit862cf5535c0cf4b39ce71a3b7e9a1c22ae4f70ae
tree3450d78b3fabbe22675771eb0350841dd8dfb1a6
parentaa86b18cc9cd147b40412a2d57b383a5e16fe3b5
HID: wacom: Introduce a new WACOM_DEVICETYPE_PAD device_type

Historically, both the touch and pad tools would have shared the
'BTN_TOOL_FINGER' type. Any time you needed to distinguish the two, you
had to use some other bit of knowledge (e.g. that the pad was on the same
interface as the pen, and thus 'touch_max' would be zero).

To make these checks more readable, we introduce WACOM_DEVICETYPE_PAD.
Although we still have to rely on other bits of knowledge to set this
bit on the right interface (since it cannot be detected from the HID
descriptor), it can be done just once inside 'wacom_setup_device_quirks'.

This patch introduces no functional changes.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h