aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-macsmc.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: rename GPIO set callbacks back to their original namesBartosz Golaszewski2025-08-071-1/+1
| | | | | | | | | | | The conversion of all GPIO drivers to using the .set_rv() and .set_multiple_rv() callbacks from struct gpio_chip (which - unlike their predecessors - return an integer and allow the controller drivers to indicate failures to users) is now complete and the legacy ones have been removed. Rename the new callbacks back to their original names in one sweeping change. Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: Add new gpio-macsmc driver for Apple MacsHector Martin2025-07-241-0/+292
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 <[email protected]> Reviewed-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Sven Peter <[email protected]> Signed-off-by: "Russell King (Oracle)" <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Sven Peter <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>