forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: HID: transport: spi: add Apple SPI transport
Keyboard and trackpad of Apple Sillicon SoCs (M1, M1 Pro/Max) laptops are are HID devices connected via SPI. This is the same protocol as implemented by applespi.c. It was not noticed that protocol is a transport for HID. Adding support for ACPI based Intel MacBooks will be done in a separate commit. How HID is mapped in this protocol is not yet fully understood. Microsoft has a specification for HID over SPI [1] incompatible with the transport protocol used by Apple. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/hid-over-spi Signed-off-by: Janne Grunau <j@jannau.net>
- Loading branch information
Showing
7 changed files
with
1,238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
menu "SPI HID support" | ||
depends on SPI | ||
|
||
config SPI_HID_APPLE_OF | ||
tristate "HID over SPI transport layer for Apple Silicon SoCs" | ||
default ARCH_APPLE | ||
depends on SPI && INPUT && OF | ||
help | ||
Say Y here if you use Apple Silicon based laptop. The keyboard and | ||
touchpad are HID based devices connected via SPI. | ||
|
||
If unsure, say N. | ||
|
||
This support is also available as a module. If so, the module | ||
will be called spi-hid-apple-of. It will also build/depend on the | ||
module spi-hid-apple. | ||
|
||
endmenu | ||
|
||
config SPI_HID_APPLE_CORE | ||
tristate | ||
default y if SPI_HID_APPLE_OF=y | ||
default m if SPI_HID_APPLE_OF=m | ||
select HID | ||
select CRC16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# Makefile for SPI HID tarnsport drivers | ||
# | ||
|
||
obj-$(CONFIG_SPI_HID_APPLE_CORE) += spi-hid-apple.o | ||
|
||
spi-hid-apple-objs = spi-hid-apple-core.o | ||
|
||
obj-$(CONFIG_SPI_HID_APPLE_OF) += spi-hid-apple-of.o |
Oops, something went wrong.