Re: [PATCH fixes v3] pinctrl: Really force states during suspend/resume

From: Marc Zyngier
Date: Thu Feb 22 2018 - 13:11:27 EST


Hi Linus,

On 22/02/18 15:30, Linus Walleij wrote:
> On Mon, Feb 19, 2018 at 8:23 PM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
>>> Am Montag, 19. Februar 2018, 19:03:27 CET schrieb Florian Fainelli:
>
>>>> Can you indicate which DTS file is used for your Chromebook model? Sorry about the breakage.
>>>
>>> that should be
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
>>>
>>> I'm vacationing right now, so don't think I'll find time to dive into
>>> Rockchip pinctrl this week. But I'd guess it could be somehow
>>> related to the ATF touching pins during suspend/resume?
>>
>> That'd be really unfortunate. I would have assumed that ATF would
>> leave things as they were instead of re-configuring them to whatever
>> default.
>>
>> The most annoying thing is that if that's indeed the case, we need to
>> find a solution that will cope with the current state of the
>> firmware. I guess that'd mean eagerly saving/restoring the pin state
>> across suspend/resume, irrespective of what firmware could do?
>
> What is ATF? Asus Touch Firmware?

More like "ARM Trusted Firmware", aka the firmware that runs on the
secure side of most 64bit ARM systems.

> Does it in effect mean that when the Rockchip pinctrl driver
> says pinctrl_force_sleep() and pinctrl_force_default()
> it expects those to be a noop?
>
> Then the real patch to apply is something deleting the
> pinctrl_force* calls from the pinctrl-rockchip driver,
> is it not?

Quite possibly. Unravelling this bit of code, I came to a similar
conclusion. The question is then: what is this call supposed to be used
for? I'm pretty sure it is not completely gratuitous, but it makes no
sense on my platform.

I'll give it a go later today.

M.
--
Jazz is not dead. It just smells funny...