aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2014-06-02 20:19:52 -0400
committerJiri Kosina <jkosina@suse.cz>2014-06-03 07:27:24 -0400
commit368c96640d10a145da5f258f2d2833668d4f3629 (patch)
treef6481440bb97219a4d2374f9d708a879b2bc22ae
parentdde3b45cd74e439457ed0126788aa40bd37f615e (diff)
HID: core: add two new usages for digitizer
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>
-rw-r--r--drivers/hid/hid-debug.c2
-rw-r--r--drivers/hid/hid-input.c5
-rw-r--r--include/linux/hid.h7
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index c2537df10f47..84c3cb15ccdd 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -165,6 +165,8 @@ static const struct hid_usage_entry hid_usage_table[] = {
165 {0, 0x53, "DeviceIndex"}, 165 {0, 0x53, "DeviceIndex"},
166 {0, 0x54, "ContactCount"}, 166 {0, 0x54, "ContactCount"},
167 {0, 0x55, "ContactMaximumNumber"}, 167 {0, 0x55, "ContactMaximumNumber"},
168 {0, 0x5A, "SecondaryBarrelSwitch"},
169 {0, 0x5B, "TransducerSerialNumber"},
168 { 15, 0, "PhysicalInterfaceDevice" }, 170 { 15, 0, "PhysicalInterfaceDevice" },
169 {0, 0x00, "Undefined"}, 171 {0, 0x00, "Undefined"},
170 {0, 0x01, "Physical_Interface_Device"}, 172 {0, 0x01, "Physical_Interface_Device"},
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9f2076acffb1..2619f7f4517a 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -684,9 +684,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
684 break; 684 break;
685 685
686 case 0x46: /* TabletPick */ 686 case 0x46: /* TabletPick */
687 case 0x5a: /* SecondaryBarrelSwitch */
687 map_key_clear(BTN_STYLUS2); 688 map_key_clear(BTN_STYLUS2);
688 break; 689 break;
689 690
691 case 0x5b: /* TransducerSerialNumber */
692 set_bit(MSC_SERIAL, input->mscbit);
693 break;
694
690 default: goto unknown; 695 default: goto unknown;
691 } 696 }
692 break; 697 break;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 720e3a10608c..a468ec8cc4fe 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -233,11 +233,6 @@ struct hid_item {
233#define HID_DG_BARRELSWITCH 0x000d0044 233#define HID_DG_BARRELSWITCH 0x000d0044
234#define HID_DG_ERASER 0x000d0045 234#define HID_DG_ERASER 0x000d0045
235#define HID_DG_TABLETPICK 0x000d0046 235#define HID_DG_TABLETPICK 0x000d0046
236/*
237 * as of May 20, 2009 the usages below are not yet in the official USB spec
238 * but are being pushed by Microsft as described in their paper "Digitizer
239 * Drivers for Windows Touch and Pen-Based Computers"
240 */
241#define HID_DG_CONFIDENCE 0x000d0047 236#define HID_DG_CONFIDENCE 0x000d0047
242#define HID_DG_WIDTH 0x000d0048 237#define HID_DG_WIDTH 0x000d0048
243#define HID_DG_HEIGHT 0x000d0049 238#define HID_DG_HEIGHT 0x000d0049
@@ -246,6 +241,8 @@ struct hid_item {
246#define HID_DG_DEVICEINDEX 0x000d0053 241#define HID_DG_DEVICEINDEX 0x000d0053
247#define HID_DG_CONTACTCOUNT 0x000d0054 242#define HID_DG_CONTACTCOUNT 0x000d0054
248#define HID_DG_CONTACTMAX 0x000d0055 243#define HID_DG_CONTACTMAX 0x000d0055
244#define HID_DG_BARRELSWITCH2 0x000d005a
245#define HID_DG_TOOLSERIALNUMBER 0x000d005b
249 246
250/* 247/*
251 * HID report types --- Ouch! HID spec says 1 2 3! 248 * HID report types --- Ouch! HID spec says 1 2 3!