diff options
author | Lorenz Brun <lorenz@brun.one> | 2023-03-09 02:10:08 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-04-19 07:08:33 -0700 |
commit | a7da8a8bf19b758d6db50a1c09627b0422fe98db (patch) | |
tree | 95a9b953c69ba73d93c6a54da2624404bb277aab /drivers/hwmon/pwm-fan.c | |
parent | dedbe4c1499cf1b7b0357872cf858221f583bfc0 (diff) |
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>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 57928d270015..6e4516c2ab89 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -508,6 +508,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 * frequency. |