summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pwm-fan.c
diff options
context:
space:
mode:
authorSung-Chi Li <lschyi@chromium.org>2025-09-11 06:56:35 +0000
committerGuenter Roeck <linux@roeck-us.net>2025-09-25 08:08:13 -0700
commitfb8e659309f72e54ed011c6bfe98597b9236805d (patch)
tree85166d33b2bd2adae20747576dc8180c8b57c62b /drivers/hwmon/pwm-fan.c
parent60ac65a31041b0e5dfd736a79027314b9d533ef5 (diff)
hwmon: (cros_ec) add PWM control over fans
Newer EC firmware supports controlling fans through host commands, so adding corresponding implementations for controlling these fans in the driver for other kernel services and userspace to control them. The driver will first probe the supported host command versions (get and set of fan PWM values, get and set of fan control mode) to see if the connected EC fulfills the requirements of controlling the fan, then exposes corresponding sysfs nodes for userspace to control the fan with corresponding read and write implementations. As EC will automatically change the fan mode to auto when the device is suspended, the power management hooks are added as well to keep the fan control mode and fan PWM value consistent during suspend and resume. As we need to access the hwmon device in the power management hook, update the driver by storing the hwmon device in the driver data 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-2-a1446cc098af@google.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
0 files changed, 0 insertions, 0 deletions