From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Cc: swarren@nvidia.com, andy.shevchenko@gmail.com,
alcooperx@gmail.com,
"open list:PIN CONTROL SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH fixes v2] pinctrl: Really force states during suspend/resume
Date: Wed, 1 Mar 2017 10:29:00 -0800 [thread overview]
Message-ID: <9f02caa1-638a-cb72-c87f-69e4282ae67d@gmail.com> (raw)
In-Reply-To: <20170227230634.10688-1-f.fainelli@gmail.com>
On 02/27/2017 03:06 PM, Florian Fainelli wrote:
> In case a platform only defaults a "default" set of pins, but not a
> "sleep" set of pins, and this particular platform suspends and resumes
> in a way that the pin states are not preserved by the hardware, when we
> resume, we would call pinctrl_single_resume() -> pinctrl_force_default()
> -> pinctrl_select_state() and the first thing we do is check that the
> pins state is the same as before, and do nothing.
>
> In order to fix this, decouple pinctrl_select_state and make it become
> pinctrl_commit_state(), taking an additional ignore_state_check boolean
> which allows us to bypass the state check during suspend/resume, since
> we really want to re-apply the previous pin states in these case.
>
> Fixes: 6e5e959dde0d ("pinctrl: API changes to support multiple states per device")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Linus, I have a better version of this coming where the p->state ==
state check is just moved into pinctrl_select_state() instead.
--
Florian
prev parent reply other threads:[~2017-03-01 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 23:06 Florian Fainelli
2017-03-01 18:29 ` Florian Fainelli [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=9f02caa1-638a-cb72-c87f-69e4282ae67d@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alcooperx@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swarren@nvidia.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
Powered by JetHome