gpio: Add new gpio-macsmc driver for Apple Macs
authorHector Martin <marcan@marcan.st>
Tue, 10 Jun 2025 15:29:47 +0000 (15:29 +0000)
committerLee Jones <lee@kernel.org>
Thu, 24 Jul 2025 08:47:33 +0000 (09:47 +0100)
commit9b21051b0885912f5bb2cc9d4f95c6fca697da4d
treeb49a0db11d6ebfc930c3d1d86d9b9d489a9ca040
parente038d985c9823a12cd64fa077d0c5aca2c644b67
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>
Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Sven Peter <sven@kernel.org>
Signed-off-by: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20250610-smc-6-15-v7-6-556cafd771d3@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
MAINTAINERS
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-macsmc.c [new file with mode: 0644]