Skip to content

Commit

Permalink
HID: add spi-hid, transport driver for HID over SPI bus
Browse files Browse the repository at this point in the history
This driver follows HID Over SPI Protocol Specification 1.0 available at
https://www.microsoft.com/en-us/download/details.aspx?id=103325. The
initial version of the driver does not support: 1) multi-fragment input
reports, 2) sending GET_INPUT and COMMAND output report types and
processing their respective acknowledge input reports, and 3) device
sleep power state.

Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>
  • Loading branch information
Jarrett Schultz authored and intel-lab-lkp committed Jul 7, 2022
1 parent 2ce2175 commit d0121c2
Show file tree
Hide file tree
Showing 10 changed files with 1,928 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/hid/Kconfig
Expand Up @@ -1330,6 +1330,8 @@ source "drivers/hid/usbhid/Kconfig"

source "drivers/hid/i2c-hid/Kconfig"

source "drivers/hid/spi-hid/Kconfig"

source "drivers/hid/intel-ish-hid/Kconfig"

source "drivers/hid/amd-sfh-hid/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/Makefile
Expand Up @@ -152,6 +152,7 @@ obj-$(CONFIG_USB_MOUSE) += usbhid/
obj-$(CONFIG_USB_KBD) += usbhid/

obj-$(CONFIG_I2C_HID_CORE) += i2c-hid/
obj-$(CONFIG_SPI_HID) += spi-hid/

obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/
obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/
Expand Down
25 changes: 25 additions & 0 deletions drivers/hid/spi-hid/Kconfig
@@ -0,0 +1,25 @@
#
# Copyright (c) 2021 Microsoft Corporation
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
menu "SPI HID support"
depends on SPI

config SPI_HID
tristate "HID over SPI transport layer"
default n
depends on SPI && INPUT && OF
select HID
help
Say Y here if you use a keyboard, a touchpad, a touchscreen, or any
other HID based devices which is connected to your computer via SPI.

If unsure, say N.

This support is also available as a module. If so, the module
will be called spi-hid.

endmenu
12 changes: 12 additions & 0 deletions drivers/hid/spi-hid/Makefile
@@ -0,0 +1,12 @@
#
# Copyright (c) 2021 Microsoft Corporation
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# Makefile for the HID over SPI transport driver
#
CFLAGS_trace.o = -I$(src)
obj-$(CONFIG_SPI_HID) += spi-hid.o
spi-hid-objs := spi-hid-core.o spi-hid-of.o trace.o

0 comments on commit d0121c2

Please sign in to comment.