]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: Add Apple Silicon SMC hwmon driver
authorJames Calligeros <jcalligeros99@gmail.com>
Wed, 12 Nov 2025 11:16:52 +0000 (21:16 +1000)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 19 Nov 2025 02:46:21 +0000 (18:46 -0800)
commit785205fd81399bd8e49065aee3362a99d5702321
treea75c0bd732ba20692a824bcb0541fd2e6ab35f89
parentd5c0ae872e2ec16280245a2f7a1edab8ba11be24
hwmon: Add Apple Silicon SMC hwmon driver

The System Management Controller on Apple Silicon devices is responsible
for integrating and exposing the data reported by the vast array of
hardware monitoring sensors present on these devices. It is also
responsible for fan control, and allows users to manually set fan
speeds if they so desire. Add a hwmon driver to expose current,
power, temperature, and voltage monitoring sensors, as well as
fan speed monitoring and control via the SMC on Apple Silicon devices.

The SMC firmware has no consistency between devices, even when they
share an SoC. The FourCC keys used to access sensors are almost
random. An M1 Mac mini will have different FourCCs for its CPU core
temperature sensors to an M1 MacBook Pro, for example. For this
reason, the valid sensors for a given device are specified in a
child of the SMC Devicetree node. The driver uses this information
to determine which sensors to make available at runtime.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Co-developed-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://lore.kernel.org/r/20251112-macsmc-subdevs-v5-6-728e4b91fe81@gmail.com
[groeck: Added Documentation to index]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/index.rst
Documentation/hwmon/macsmc-hwmon.rst [new file with mode: 0644]
MAINTAINERS
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/macsmc-hwmon.c [new file with mode: 0644]