Add a hwmon driver that reports fan and temperature readings from the ChromeOS Embedded controller. There was an earlier effort in 2017 to add such a driver [0], but there was no followup after v1. The new driver is complete reimplementation based on newer APIs and with more features (temp sensor names). It only works on LPC-connected ECs, as only those implement direct memory-map access. For other busses the data would need to be read with a command. Adding some helpers was discussed in the previous patchset [1]. The EC protocols also support reading and writing fan curves but that is not implemented. Tested on a Framework 13 AMD, Firmware 3.05. [0] https://lore.kernel.org/all/1491602410-31518-1-git-send-email-moritz.fischer@xxxxxxxxx/ [1] https://lore.kernel.org/all/ac61bfca-bfa0-143b-c9ca-365b8026ce8d@xxxxxxxxxxxx/ Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx> --- Thomas Weißschuh (2): hwmon: add ChromeOS EC driver mfd: cros_ec: Register hardware monitoring subdevice Documentation/hwmon/cros_ec_hwmon.rst | 26 ++++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 8 + drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/cros_ec_hwmon.c | 279 ++++++++++++++++++++++++++++++++++ drivers/mfd/cros_ec_dev.c | 1 + 7 files changed, 327 insertions(+) --- base-commit: 2fbe479c0024e1c6b992184a799055e19932aa48 change-id: 20240506-cros_ec-hwmon-24634b07cf6f Best regards, -- Thomas Weißschuh <linux@xxxxxxxxxxxxxx>