Skip to content

Commit 038b1a0

Browse files
roadrunner2dtor
authored andcommitted
Input: add Apple SPI keyboard and trackpad driver
The keyboard and trackpad on recent MacBook's (since 8,1) and MacBookPro's (13,* and 14,*) are attached to an SPI controller instead of USB, as previously. The higher level protocol is not publicly documented and hence has been reverse engineered. As a consequence there are still a number of unknown fields and commands. However, the known parts have been working well and received extensive testing and use. In order for this driver to work, the proper SPI drivers need to be loaded too; for MB8,1 these are spi_pxa2xx_platform and spi_pxa2xx_pci; for all others they are spi_pxa2xx_platform and intel_lpss_pci. Link: https://bugzilla.kernel.org/show_bug.cgi?id=99891 Link: https://bugzilla.kernel.org/show_bug.cgi?id=108331 Signed-off-by: Ronald Tschalär <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 7e4935c commit 038b1a0

File tree

5 files changed

+2117
-0
lines changed

5 files changed

+2117
-0
lines changed

drivers/input/keyboard/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@ config KEYBOARD_AMIGA
7171
config ATARI_KBD_CORE
7272
bool
7373

74+
config KEYBOARD_APPLESPI
75+
tristate "Apple SPI keyboard and trackpad"
76+
depends on ACPI && EFI
77+
depends on SPI
78+
depends on X86 || COMPILE_TEST
79+
help
80+
Say Y here if you are running Linux on any Apple MacBook8,1 or later,
81+
or any MacBookPro13,* or MacBookPro14,*.
82+
83+
You will also need to enable appropriate SPI master controllers:
84+
spi_pxa2xx_platform and spi_pxa2xx_pci for MacBook8,1, and
85+
spi_pxa2xx_platform and intel_lpss_pci for the rest.
86+
87+
To compile this driver as a module, choose M here: the
88+
module will be called applespi.
89+
7490
config KEYBOARD_ATARI
7591
tristate "Atari keyboard"
7692
depends on ATARI

drivers/input/keyboard/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o
1010
obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o
1111
obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o
1212
obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
13+
obj-$(CONFIG_KEYBOARD_APPLESPI) += applespi.o
1314
obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
1415
obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
1516
obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o

0 commit comments

Comments
 (0)