input: apple: Add support for Apple SPI keyboard
authorMark Kettenis <kettenis@openbsd.org>
Sun, 23 Jan 2022 15:48:13 +0000 (16:48 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 10 Feb 2022 21:44:23 +0000 (16:44 -0500)
commitd42f1074253505f4e129267faa0d34676ca54d1f
treefa8742ca65a4ccd8c3409e2d9af32da679e3fab9
parent7184e2997e7d97ba3e697a0acc1800ddd89d3f6d
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>
configs/apple_m1_defconfig
drivers/input/Kconfig
drivers/input/Makefile
drivers/input/apple_spi_kbd.c [new file with mode: 0644]
include/configs/apple.h