]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
HID: core: add two new usages for digitizer
authorPing Cheng <pinglinux@gmail.com>
Tue, 3 Jun 2014 00:19:52 +0000 (17:19 -0700)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Jul 2015 12:10:57 +0000 (14:10 +0200)
commit 368c96640d10a145da5f258f2d2833668d4f3629 upstream.

On Feb 17, 2014, two new usages are approved to HID usage Table 18 -
Digitizer Page:

5A Secondary Barrel Switch MC 16.4
5B Transducer Serial Number SV 16.3.1

This patch adds relevant definitions to hid/input. It also removes
outdated comments in hid.h.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/hid/hid-debug.c
drivers/hid/hid-input.c
include/linux/hid.h

index 53eaa0b6b1d19423f0bea09b17c970c72353cad8..436c774cc2219e2e65225ea8a39e1202147cf16e 100644 (file)
@@ -165,6 +165,8 @@ static const struct hid_usage_entry hid_usage_table[] = {
     {0, 0x53, "DeviceIndex"},
     {0, 0x54, "ContactCount"},
     {0, 0x55, "ContactMaximumNumber"},
+    {0, 0x5A, "SecondaryBarrelSwitch"},
+    {0, 0x5B, "TransducerSerialNumber"},
   { 15, 0, "PhysicalInterfaceDevice" },
     {0, 0x00, "Undefined"},
     {0, 0x01, "Physical_Interface_Device"},
index 40113e9db514a8fe23cf5d447d50f7fd7ef7325e..8c58c820488c16a5cb45d9224996e1941084445b 100644 (file)
@@ -690,9 +690,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
                        break;
 
                case 0x46: /* TabletPick */
+               case 0x5a: /* SecondaryBarrelSwitch */
                        map_key_clear(BTN_STYLUS2);
                        break;
 
+               case 0x5b: /* TransducerSerialNumber */
+                       set_bit(MSC_SERIAL, input->mscbit);
+                       break;
+
                default:  goto unknown;
                }
                break;
index 00c88fccd162c917ad0c62d1de8ebe8e4b806a7f..2cd43971c297aae73b12cd424ea3a230c5f34755 100644 (file)
@@ -230,11 +230,6 @@ struct hid_item {
 #define HID_DG_BARRELSWITCH    0x000d0044
 #define HID_DG_ERASER          0x000d0045
 #define HID_DG_TABLETPICK      0x000d0046
-/*
- * as of May 20, 2009 the usages below are not yet in the official USB spec
- * but are being pushed by Microsft as described in their paper "Digitizer
- * Drivers for Windows Touch and Pen-Based Computers"
- */
 #define HID_DG_CONFIDENCE      0x000d0047
 #define HID_DG_WIDTH           0x000d0048
 #define HID_DG_HEIGHT          0x000d0049
@@ -243,6 +238,8 @@ struct hid_item {
 #define HID_DG_DEVICEINDEX     0x000d0053
 #define HID_DG_CONTACTCOUNT    0x000d0054
 #define HID_DG_CONTACTMAX      0x000d0055
+#define HID_DG_BARRELSWITCH2   0x000d005a
+#define HID_DG_TOOLSERIALNUMBER        0x000d005b
 
 /*
  * HID report types --- Ouch! HID spec says 1 2 3!