hwmon: (cros_ec) register fans into thermal framework cooling devices
authorSung-Chi Li <lschyi@chromium.org>
Thu, 11 Sep 2025 06:56:36 +0000 (06:56 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 25 Sep 2025 15:08:14 +0000 (08:08 -0700)
commit5798b62867b47b6ace287d31172ce748ad70d869
treeebc1cb6eb9fc53ef65d4c6b24101a5939204c565
parentfb8e659309f72e54ed011c6bfe98597b9236805d
hwmon: (cros_ec) register fans into thermal framework cooling devices

Register fans connected under EC as thermal cooling devices as well, so
these fans can then work with the thermal framework.

During the driver probing phase, we will also try to register each fan
as a thermal cooling device based on previous probe result (whether the
there are fans connected on that channel, and whether EC supports fan
control). The basic get max state, get current state, and set current
state methods are then implemented as well.

Signed-off-by: Sung-Chi Li <lschyi@chromium.org>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20250911-cros_ec_fan-v6-3-a1446cc098af@google.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/cros_ec_hwmon.rst
drivers/hwmon/cros_ec_hwmon.c