From: Guenter Roeck <linux@roeck-us.net>
To: Lorenz Brun <lorenz@brun.one>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: pwm-fan: set usage_power on PWM state
Date: Tue, 21 Mar 2023 08:03:31 -0700 [thread overview]
Message-ID: <571a612a-9779-41da-b857-2880c8298d0c@roeck-us.net> (raw)
In-Reply-To: <20230309011009.2109696-1-lorenz@brun.one>
On Thu, Mar 09, 2023 at 02:10:08AM +0100, Lorenz Brun wrote:
> 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>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> drivers/hwmon/pwm-fan.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
> index 83a347ca35da..aa746c2bde39 100644
> --- a/drivers/hwmon/pwm-fan.c
> +++ b/drivers/hwmon/pwm-fan.c
> @@ -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
prev parent reply other threads:[~2023-03-21 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 1:10 [PATCH] hwmon: pwm-fan: set usage_power on PWM state Lorenz Brun
2023-03-16 2:26 ` Guenter Roeck
2023-03-17 11:33 ` Lorenz Brun
2023-03-21 15:03 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=571a612a-9779-41da-b857-2880c8298d0c@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenz@brun.one \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).