diff mbox series

[2/3] HID: core: Add bus define for SoundWire bus

Message ID 20250611102650.563137-1-shumingf@realtek.com
State New
Headers show
Series None | expand

Commit Message

Shuming [范書銘] June 11, 2025, 10:26 a.m. UTC
From: Charles Keepax <ckeepax@opensource.cirrus.com>

SDCA (SoundWire Device Class for Audio) uses HID to convey
input events from peripheral devices. Add a bus define for the
SoundWire bus to prepare support for this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/hid/hid-core.c     | 3 +++
 include/uapi/linux/input.h | 1 +
 2 files changed, 4 insertions(+)

Comments

Shuming [范書銘] June 16, 2025, 2:17 a.m. UTC | #1
> > SDCA (SoundWire Device Class for Audio) uses HID to convey input
> > events from peripheral devices. Add a bus define for the SoundWire bus
> > to prepare support for this.
> 
> Patch 3 depends on this one and it seems fairly straightforward - it seems like
> it'd make sense to take it through the ASoC tree?

Agreed. I will send this series to the ASoC tree.
diff mbox series

Patch

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index b348d0464314..b419e31005b8 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2294,6 +2294,9 @@  int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 	case BUS_I2C:
 		bus = "I2C";
 		break;
+	case BUS_SDW:
+		bus = "SOUNDWIRE";
+		break;
 	case BUS_VIRTUAL:
 		bus = "VIRTUAL";
 		break;
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 2557eb7b0561..127119c287cf 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -275,6 +275,7 @@  struct input_mask {
 #define BUS_CEC			0x1E
 #define BUS_INTEL_ISHTP		0x1F
 #define BUS_AMD_SFH		0x20
+#define BUS_SDW			0x21
 
 /*
  * MT_TOOL types