mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
hwmon: (pwm-fan) set usage_power on PWM state
PWM fans are controlled solely by the duty cycle of the PWM signal, they do not care about the exact timing. Thus set usage_power to true to allow less flexible hardware to work as a PWM source for fan control. Signed-off-by: Lorenz Brun <lorenz@brun.one> Link: https://lore.kernel.org/r/20230309011009.2109696-1-lorenz@brun.one Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
dedbe4c149
commit
a7da8a8bf1
@ -507,6 +507,14 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
||||
|
||||
pwm_init_state(ctx->pwm, &ctx->pwm_state);
|
||||
|
||||
/*
|
||||
* PWM fans are controlled solely by the duty cycle of the PWM signal,
|
||||
* they do not care about the exact timing. Thus set usage_power to true
|
||||
* to allow less flexible hardware to work as a PWM source for fan
|
||||
* control.
|
||||
*/
|
||||
ctx->pwm_state.usage_power = true;
|
||||
|
||||
/*
|
||||
* set_pwm assumes that MAX_PWM * (period - 1) fits into an unsigned
|
||||
* long. Check this here to prevent the fan running at a too low
|
||||
|
Loading…
Reference in New Issue
Block a user