From: Rob Herring <robh@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Linux HWMON List <linux-hwmon@vger.kernel.org>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Kamil Debski <kamil@wypas.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH 1/2] hwmon: (pwm-fan) add option to stop fan on shutdown
Date: Mon, 13 Jan 2020 10:03:29 -0600 [thread overview]
Message-ID: <CAL_JsqLDz+zk0Ah4YN1EUm_qzFjbjLFmcoKUX1ZGGeZpAzdeNA@mail.gmail.com> (raw)
In-Reply-To: <CAC5umygcuGTKw=8NO+yM4z=MpAiw62Eo6p0vky_soTRmn0Y1Wg@mail.gmail.com>
On Thu, Jan 9, 2020 at 11:07 PM Akinobu Mita <akinobu.mita@gmail.com> wrote:
>
> 2020年1月9日(木) 1:13 Rob Herring <robh@kernel.org>:
> >
> > On Sun, Dec 22, 2019 at 11:10:22PM +0900, Akinobu Mita wrote:
> > > The pwm-fan driver leaves the fun running when shutting down the system.
> > > (On the other hand the gpio-fan driver stops it.)
> >
> > Seemms like we should have consistent behavior independent of what the
> > underlying implementation uses. Is there actually a case you'd want to
> > leave the fan on? It seems strange to disable in suspend and leave on in
> > shutdown.
>
> I agree. I was trying to keep the current behavior unchanged, so I added
> "disable-state-shutdown" property. But I can't think of any case we want
> to leave the fun on in shutdown.
>
> So it's better to change the shutdown behavior and remove the option
> completely or add "retain-state-shutdown" property instead.
> (The "retain-state-shutdown" property is inspired by gpio-leds)
I would just turn off the fan in shutdown and see if anyone complains.
> > Wouldn't the shutdown state depend if the PWM off state is high or low?
> > IIRC, i.MX PWM has a quirk that the PWM disabled state is high. Doesn't
>
> It could be possible to affect the shutdown behavior for pwm-fan.
> There are three i.MX PWM drivers (pwm-imx1, pwm-imx27, and pwm-tpm).
> Do you remember which one actually have such limitation?
No. I believe the fix was to use pinctrl modes to force the state. And
I think the issue was for suspend rather than shutdown (but it seems
unlikely you'd want the fan off in suspend and on in shutdown).
>
> Maybe it should be handled by the PWM controller/chip driver and PWM core.
> From the perspective of PWM user drivers for now, we have nothing to do
> other than setting duty cycle zero and then disable PWM for stopping the
> pwm-fan.
>
> > it also depend on what the PWM driver does in shutdown?
>
> I think so. But as far as I can see, no PWM drivers implement shutdown
> callback.
Do they need to? I'd assume most SoC's are powered off or put in reset
which makes the PWN pin go low.
Rob
next prev parent reply other threads:[~2020-01-13 16:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 14:10 [PATCH 0/2] hwmon: (pwm-fan) add option to stop fan on shutdown Akinobu Mita
2019-12-22 14:10 ` [PATCH 1/2] " Akinobu Mita
2020-01-08 16:13 ` Rob Herring
2020-01-10 5:06 ` Akinobu Mita
2020-01-13 16:03 ` Rob Herring [this message]
2019-12-22 14:10 ` [PATCH 2/2] dt-bindings: hwmon: (pwm-fan) add disable-state-shutdown property Akinobu Mita
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=CAL_JsqLDz+zk0Ah4YN1EUm_qzFjbjLFmcoKUX1ZGGeZpAzdeNA@mail.gmail.com \
--to=robh@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=kamil@wypas.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
/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).