mbox series

[v1,0/5] Add spi-hid, transport for HID over SPI bus

Message ID 20211229231141.303919-1-dmanti@microsoft.com
Headers show
Series Add spi-hid, transport for HID over SPI bus | expand

Message

Dmitry Antipov Dec. 29, 2021, 11:11 p.m. UTC
Surface Duo devices use a touch digitizer that communicates to the main
SoC via SPI and presents itself as a HID device. This patch's goal is to
add the spi-hid transport driver to drivers/hid. The driver follows the
publically available HID Over SPI Protocol Specification version 1.0.

In the initial commits there are some HID core changes to support a SPI
device, followed by extensions to hid_driver and hid_ll_driver structs
to allow for some error-handling logic delegation from the transport
layer to the device driver, and finally the SPI HID transport driver.

Dmitry Antipov (5):
  HID: Add BUS_SPI support when printing out device info in
    hid_connect()
  HID: define HID_SPI_DEVICE macro in hid.h
  HID: add on_transport_error() field to struct hid_driver
  HID: add reset() field to struct hid_ll_driver
  HID: add spi-hid, transport driver for HID over SPI bus

 arch/arm64/configs/defconfig        |    1 +
 drivers/hid/Kconfig                 |    2 +
 drivers/hid/Makefile                |    1 +
 drivers/hid/hid-core.c              |    3 +
 drivers/hid/spi-hid/Kconfig         |   25 +
 drivers/hid/spi-hid/Makefile        |   12 +
 drivers/hid/spi-hid/spi-hid-core.c  | 1487 +++++++++++++++++++++++++++
 drivers/hid/spi-hid/spi-hid-core.h  |  201 ++++
 drivers/hid/spi-hid/spi-hid_trace.h |  197 ++++
 drivers/hid/spi-hid/trace.c         |   11 +
 include/linux/hid.h                 |   24 +
 11 files changed, 1964 insertions(+)
 create mode 100644 drivers/hid/spi-hid/Kconfig
 create mode 100644 drivers/hid/spi-hid/Makefile
 create mode 100644 drivers/hid/spi-hid/spi-hid-core.c
 create mode 100644 drivers/hid/spi-hid/spi-hid-core.h
 create mode 100644 drivers/hid/spi-hid/spi-hid_trace.h
 create mode 100644 drivers/hid/spi-hid/trace.c