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)
committerHector Martin <marcan@marcan.st>
Sat, 19 Feb 2022 10:31:31 +0000 (19:31 +0900)
commit83e856f02cb4554781f71d191840f8d3c2b21588
tree487a07c1812fefc40c9c2c39e71518690d3c457f
parente4ac9bebeb083a52e6d9874bab74c32380a53594
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]