linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: core: add TransducerSerialNumber2
@ 2021-08-20 16:16 Felipe Balbi
  2021-09-15 14:46 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Felipe Balbi @ 2021-08-20 16:16 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, Felipe Balbi

From: Felipe Balbi <felipe.balbi@microsoft.com>

A recent request for change to the HID spec got approved adding support
for another 4-bytes to the Transducer Serial Number. This commit adds
support for the new usage.

https://www.usb.org/sites/default/files/hutrr103-transducerserialnumbermoresignificantbits_0.pdf

Signed-off-by: Felipe Balbi <felipe.balbi@microsoft.com>
---
 drivers/hid/hid-debug.c | 1 +
 drivers/hid/hid-input.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index fa57d05badf7..e6f18a181eb8 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -160,6 +160,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
     {0, 0x59, "ButtonType"},
     {0, 0x5A, "SecondaryBarrelSwitch"},
     {0, 0x5B, "TransducerSerialNumber"},
+    {0, 0x6e, "TransducerSerialNumber2"},
   { 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 4286a51f7f16..82089b59609f 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -873,6 +873,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 			break;
 
 		case 0x5b: /* TransducerSerialNumber */
+		case 0x6e: /* TransducerSerialNumber2 */
 			usage->type = EV_MSC;
 			usage->code = MSC_SERIAL;
 			bit = input->mscbit;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: core: add TransducerSerialNumber2
  2021-08-20 16:16 [PATCH] HID: core: add TransducerSerialNumber2 Felipe Balbi
@ 2021-09-15 14:46 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2021-09-15 14:46 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Benjamin Tissoires, linux-input, Felipe Balbi

On Fri, 20 Aug 2021, Felipe Balbi wrote:

> From: Felipe Balbi <felipe.balbi@microsoft.com>
> 
> A recent request for change to the HID spec got approved adding support
> for another 4-bytes to the Transducer Serial Number. This commit adds
> support for the new usage.
> 
> https://www.usb.org/sites/default/files/hutrr103-transducerserialnumbermoresignificantbits_0.pdf
> 
> Signed-off-by: Felipe Balbi <felipe.balbi@microsoft.com>

Applied, thanks Felipe.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-15 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 16:16 [PATCH] HID: core: add TransducerSerialNumber2 Felipe Balbi
2021-09-15 14:46 ` 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).