]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3c113d656333e52ef685913fd26f2e244cd85ae8
tree3450d78b3fabbe22675771eb0350841dd8dfb1a6
parenta461dbe7b93561a2cef38500c9ced2b2ac96e676
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