From: Felipe Balbi <balbi@kernel.org>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org, Felipe Balbi <felipe.balbi@microsoft.com>
Subject: [PATCH] HID: core: add TransducerSerialNumber2
Date: Fri, 20 Aug 2021 19:16:55 +0300 [thread overview]
Message-ID: <20210820161655.211583-1-balbi@kernel.org> (raw)
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
next reply other threads:[~2021-08-20 16:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 16:16 Felipe Balbi [this message]
2021-09-15 14:46 ` [PATCH] HID: core: add TransducerSerialNumber2 Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210820161655.211583-1-balbi@kernel.org \
--to=balbi@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=felipe.balbi@microsoft.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.