gpio: Add new gpio-macsmc driver for Apple Macs
authorHector Martin <marcan@marcan.st>
Fri, 4 Feb 2022 03:52:52 +0000 (12:52 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:52:57 +0000 (10:52 -0700)
commitf3fa04d1bcbcc0e86ce4f724bf8f30df88d92e89
tree41f05d9f86e5b1933749230f9ffcec3952f18d8e
parent3b4cad8d33bdf53b6c2ef6a86a3b4100f5523693
gpio: Add new gpio-macsmc driver for Apple Macs

This driver implements the GPIO service on top of the SMC framework
on Apple Mac machines. In particular, these are the GPIOs present in the
PMU IC which are used to control power to certain on-board devices.

Although the underlying hardware supports various pin config settings
(input/output, open drain, etc.), this driver does not implement that
functionality and leaves it up to the firmware to configure things
properly. We also don't yet support interrupts/events. This is
sufficient for device power control, which is the only thing we need to
support at this point. More features will be implemented when needed.

To our knowledge, only Apple Silicon Macs implement this SMC feature.

Signed-off-by: Hector Martin <marcan@marcan.st>
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-macsmc.c [new file with mode: 0644]