Re: [PATCH fixes v4] pinctrl: Do not check previous and current state
From: Linus Walleij
Date: Wed Mar 15 2017 - 06:28:23 EST
On Tue, Mar 7, 2017 at 7:52 PM, Florian Fainelli <f.fainelli@xxxxxxxxx> 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, just remove the p->state == state check from
> pinctrl_select_state() since it would not allow callers of this function
> to get the pins to be brought into the expected state.
>
> Fixes: 6e5e959dde0d ("pinctrl: API changes to support multiple states per device")
> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
I responded to some patch in the series yesterday that what we
need is to inform the pinctrl core that we lost state, so let's discuss
this in that thread.
Yours,
Linus Walleij