linux-kernel-test/drivers/input/tablet
Jason Gerecke 5866d9e3b7 Input: wacom - use full 32-bit HID Usage value in switch statement
A HID Usage is a 32-bit value: an upper 16-bit "page" and a lower 16-bit
ID. While the two halves are normally reported seperately, only the
combination uniquely idenfifes a particular HID Usage.

The existing code performs the comparison in two steps, first performing a
switch on the ID and then verifying the page within each case. While this
works fine, it is very akward to handle two Usages that share a single ID,
such as HID_USAGE_PRESSURE and HID_USAGE_X because the case statement can
only have a single identifier.

To work around this, we now check the full 32-bit HID Usage directly rather
than first checking the ID and then the page.  This allows the switch
statement to have distinct cases for e.g. HID_USAGE_PRESSURE and
HID_USAGE_X.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Aaron Skomra <Aaron.Skomra@wacom.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19 13:57:34 -07:00
..
acecad.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
aiptek.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
gtco.c Input: gtco - fix usb_dev leak 2014-01-27 22:34:49 -08:00
hanwang.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
kbtab.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
Kconfig Merge branch 'next' into for-linus 2012-03-27 00:27:10 -07:00
Makefile Input: add support for Hanwang tablets 2010-09-01 23:26:18 -07:00
wacom_sys.c Input: wacom - use full 32-bit HID Usage value in switch statement 2014-04-19 13:57:34 -07:00
wacom_wac.c Input: wacom - missed the last bit of expresskey for DTU-1031 2014-04-19 13:56:07 -07:00
wacom_wac.h Input: wacom - add support for DTU-1031 2014-01-20 20:36:57 -08:00
wacom.h Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00