Skip to content

Commit

Permalink
Input: add Apple SPI keyboard and trackpad driver
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
roadrunner2 authored and dtor committed Jul 19, 2019
1 parent 7e4935c commit 038b1a0
Show file tree
Hide file tree
Showing 5 changed files with 2,117 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/input/keyboard/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ config KEYBOARD_AMIGA
config ATARI_KBD_CORE
bool

config KEYBOARD_APPLESPI
tristate "Apple SPI keyboard and trackpad"
depends on ACPI && EFI
depends on SPI
depends on X86 || COMPILE_TEST
help
Say Y here if you are running Linux on any Apple MacBook8,1 or later,
or any MacBookPro13,* or MacBookPro14,*.

You will also need to enable appropriate SPI master controllers:
spi_pxa2xx_platform and spi_pxa2xx_pci for MacBook8,1, and
spi_pxa2xx_platform and intel_lpss_pci for the rest.

To compile this driver as a module, choose M here: the
module will be called applespi.

config KEYBOARD_ATARI
tristate "Atari keyboard"
depends on ATARI
Expand Down
1 change: 1 addition & 0 deletions drivers/input/keyboard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o
obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o
obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o
obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
obj-$(CONFIG_KEYBOARD_APPLESPI) += applespi.o
obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o
Expand Down
Loading

0 comments on commit 038b1a0

Please sign in to comment.