From: Guenter Roeck <linux@roeck-us.net>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
b.zolnierkie@samsung.com, jdelvare@suse.com,
u.kleine-koenig@pengutronix.de, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: BMC-SW@aspeedtech.com, stable@vger.kernel.org
Subject: Re: [PATCH] hwmon: (pwm-fan) Ensure the fan going on in .probe()
Date: Tue, 30 Nov 2021 06:33:59 -0800 [thread overview]
Message-ID: <175a4963-62dd-9213-1e92-74e8cd9829fc@roeck-us.net> (raw)
In-Reply-To: <20211130092212.17783-1-billy_tsai@aspeedtech.com>
On 11/30/21 1:22 AM, Billy Tsai wrote:
> Before commit 86585c61972f ("hwmon: (pwm-fan) stop using legacy
> PWM functions and some cleanups") pwm_apply_state() was called
> unconditionally in pwm_fan_probe(). In this commit this direct
> call was replaced by a call to __set_pwm(ct, MAX_PWM) which
> however is a noop if ctx->pwm_value already matches the value to
> set.
> After probe the fan is supposed to run at full speed, and the
> internal driver state suggests it does, but this isn't asserted
> and depending on bootloader and pwm low-level driver, the fan
> might just be off.
> So drop setting pwm_value to MAX_PWM to ensure the check in
> __set_pwm doesn't make it exit early and the fan goes on as
> intended.
>
> Cc: stable@vger.kernel.org
> Fixes: 86585c61972f ("hwmon: (pwm-fan) stop using legacy PWM functions and some cleanups")
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
I'll apply this patch, but _please_ version your patches in the future
and provide a change log.
Guenter
> ---
> drivers/hwmon/pwm-fan.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
> index 17518b4cab1b..f12b9a28a232 100644
> --- a/drivers/hwmon/pwm-fan.c
> +++ b/drivers/hwmon/pwm-fan.c
> @@ -336,8 +336,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
> return ret;
> }
>
> - ctx->pwm_value = MAX_PWM;
> -
> pwm_init_state(ctx->pwm, &ctx->pwm_state);
>
> /*
>
prev parent reply other threads:[~2021-11-30 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 9:22 Billy Tsai
2021-11-30 10:38 ` Uwe Kleine-König
2021-11-30 14:33 ` 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=175a4963-62dd-9213-1e92-74e8cd9829fc@roeck-us.net \
--to=linux@roeck-us.net \
--cc=BMC-SW@aspeedtech.com \
--cc=b.zolnierkie@samsung.com \
--cc=billy_tsai@aspeedtech.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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
all inboxes | Powered by JetHome®