On Fri, Jul 18, 2025 at 03:08:29PM +0800, Sung-Chi Li wrote: > From: Sung-Chi Li <lschyi@xxxxxxxxxxxx> > > 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@xxxxxxxxxxxx> > Acked-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx> Applied. Thanks, Guenter