platform/apple: Add new Apple Mac SMC driver
authorHector Martin <marcan@marcan.st>
Fri, 4 Feb 2022 03:47:07 +0000 (12:47 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 15 Feb 2022 09:59:32 +0000 (18:59 +0900)
commit63615eb2a0f68ad3d05cf48ccf0771dd613e1f44
tree9447b9f661eb1c7747df9a33c0d5c228c4af77ca
parent06412013970b20c471a284c648e460ec1159b62f
platform/apple: Add new Apple Mac SMC driver

This driver implements support for the SMC (System Management
Controller) in Apple Macs. In contrast to the existing applesmc driver,
it uses pluggable backends that allow it to support different SMC
implementations, and uses the MFD subsystem to expose the core SMC
functionality so that specific features (gpio, hwmon, battery, etc.) can
be implemented by separate drivers in their respective downstream
subsystems.

The initial RTKit backend adds support for Apple Silicon Macs (M1 et
al). We hope a backend for T2 Macs will be written in the future
(since those are not supported by applesmc), and eventually an x86
backend would allow us to fully deprecate applesmc in favor of this
driver.

Signed-off-by: Hector Martin <marcan@marcan.st>
drivers/platform/Kconfig
drivers/platform/Makefile
drivers/platform/apple/Kconfig [new file with mode: 0644]
drivers/platform/apple/Makefile [new file with mode: 0644]
drivers/platform/apple/smc.h [new file with mode: 0644]
drivers/platform/apple/smc_core.c [new file with mode: 0644]
drivers/platform/apple/smc_rtkit.c [new file with mode: 0644]
include/linux/mfd/macsmc.h [new file with mode: 0644]