platform/apple: Add new Apple Mac SMC driver
authorHector Martin <marcan@marcan.st>
Fri, 4 Feb 2022 03:47:07 +0000 (12:47 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:52:57 +0000 (10:52 -0700)
commit3b4cad8d33bdf53b6c2ef6a86a3b4100f5523693
tree2e96b0ce422a336230b1343c0c6fbb7abc0ab06e
parent4168734dceee6218086cf4ec607bbfd7f1783db6
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]