summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom_wac.h
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2015-06-15 18:01:42 -0700
committerJiri Kosina <jkosina@suse.cz>2015-06-18 10:42:39 +0200
commitaa86b18cc9cd147b40412a2d57b383a5e16fe3b5 (patch)
tree5eb7432d73c86e3008f42fcc38013ff7e9b8ccaf /drivers/hid/wacom_wac.h
parent44b5250b97a0e5c3a257430ea28b10cf73899bd4 (diff)
downloadop-kernel-dev-aa86b18cc9cd147b40412a2d57b383a5e16fe3b5.zip
op-kernel-dev-aa86b18cc9cd147b40412a2d57b383a5e16fe3b5.tar.gz
HID: wacom: Treat features->device_type values as flags
The USB devices that this driver has historically supported segregate the pen and touch portions of the tablet. Oftentimes the segregation would be done at the interface level, though on occasion (e.g. Cintiq 24HDT) the tablet would combine two totally independent USB devices behind an internal USB hub. Because pen and touch never shared the same interface, it made sense for the 'device_type' to store a single value: "pen" or "touch". Recently, however, some I2C devices have been created which combine the two. A first step to accomodating this is to expand 'device_type' so that it can represent two (or potentially more) types simultaneously. To do this, we treat it as a bitfield and set/check individual bits rather than using the '=' and '==' operators. This should not result in any functional change since no supported devices (that I'm aware of, at least) have HID descriptors that indicate both pen and touch reports on a single interface. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_wac.h')
-rw-r--r--drivers/hid/wacom_wac.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index 9a5ee62..da2b309 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -72,6 +72,11 @@
#define WACOM_QUIRK_MONITOR 0x0004
#define WACOM_QUIRK_BATTERY 0x0008
+/* device types */
+#define WACOM_DEVICETYPE_NONE 0x0000
+#define WACOM_DEVICETYPE_PEN 0x0001
+#define WACOM_DEVICETYPE_TOUCH 0x0002
+
#define WACOM_VENDORDEFINED_PEN 0xff0d0001
#define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \
OpenPOWER on IntegriCloud