* [PATCH] HID: input - Add two new usages for digitizer
@ 2014-06-03 0:19 Ping Cheng
2014-06-03 11:32 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Ping Cheng @ 2014-06-03 0:19 UTC (permalink / raw)
To: linux-input; +Cc: jkosina, dmitry.torokhov, Ping Cheng
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>
---
drivers/hid/hid-debug.c | 2 ++
drivers/hid/hid-input.c | 5 +++++
include/linux/hid.h | 7 ++-----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 53b771d..f299f42 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[] = {
{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"},
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index e7e8b19..da0267e 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
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;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 720e3a1..a468ec8 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -233,11 +233,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
@@ -246,6 +241,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!
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: input - Add two new usages for digitizer
2014-06-03 0:19 [PATCH] HID: input - Add two new usages for digitizer Ping Cheng
@ 2014-06-03 11:32 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2014-06-03 11:32 UTC (permalink / raw)
To: Ping Cheng; +Cc: linux-input, dmitry.torokhov, Ping Cheng
On Mon, 2 Jun 2014, Ping Cheng wrote:
> 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>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-03 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 0:19 [PATCH] HID: input - Add two new usages for digitizer Ping Cheng
2014-06-03 11:32 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).