hwmon: (pwm-fan) Default to the Maximum cooling level if provided
authorPeter Korsgaard <peter@korsgaard.com>
Mon, 13 Jan 2025 13:51:18 +0000 (14:51 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 13 Jan 2025 16:55:46 +0000 (08:55 -0800)
commitecf1cf1c58c17a2eda046787b73baba2ac547c16
tree6ef544e738dfccf88cda9733844ae1e6b958ac6c
parent74a2594a2767e890348ef4cfe64b7908d00d5353
hwmon: (pwm-fan) Default to the Maximum cooling level if provided

The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not
always be desirable because of noise or power consumption peaks.

The driver optionally accept a list of "cooling-levels" for the thermal
subsystem.  If provided, use the PWM value corresponding to the maximum
cooling level rather than the full level as the initial PWM setting.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://lore.kernel.org/r/20250113135118.3994998-1-peter@korsgaard.com
[groeck: Dropped double empty line]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pwm-fan.c