input: apple: Add support for Apple SPI keyboard
This driver adds support for the keyboard on Apple Silicon laptops.
The controller for this keyboard sits on an SPI bus and uses an
Apple-specific HID over SPI protocol. The packets sent by this
controller for key presses and key releases are fairly simple and
are decoded directly by the code in this driver and converted into
standard Linux keycodes. The same controller handles the touchpad
found on these laptops. Packets for touchpad events are simply
ignored.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on: Macbook Air M1
Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index 0b753f3..2718b36 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -47,6 +47,14 @@
and is only used by novena. For new boards, use driver model
instead.
+config APPLE_SPI_KEYB
+ bool "Enable Apple SPI keyboard support"
+ depends on DM_KEYBOARD && DM_SPI
+ help
+ This adds a driver for the keyboards found on various
+ laptops based on Apple SoCs. These keyboards use an
+ Apple-specific HID-over-SPI protocol.
+
config CROS_EC_KEYB
bool "Enable Chrome OS EC keyboard support"
depends on INPUT