From: Florian Fainelli <f.fainelli@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
ext Tony Lindgren <tony@atomide.com>,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Stephen Warren <swarren@nvidia.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Al Cooper <alcooperx@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>
Subject: Re: [PATCH 1/2] pinctrl: Allow a device to indicate when to force a state
Date: Mon, 25 Sep 2017 12:18:46 -0700 [thread overview]
Message-ID: <d6320101-d8a8-636c-83e9-a7c653c07ef3@gmail.com> (raw)
In-Reply-To: <CACRpkdbkSE6jckE9HekQZg=nAd6e91Uv7CwGEdPy24YyoQcnog@mail.gmail.com>
On 09/22/2017 06:57 AM, Linus Walleij wrote:
> On Fri, Sep 22, 2017 at 3:20 PM, Charles Keepax
> <ckeepax@opensource.cirrus.com> wrote:
>> On Fri, Sep 22, 2017 at 01:55:22PM +0200, Linus Walleij wrote:
>
>>> Next point, this commit from Baolin:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt?id=6606bc9dee63ad8cda2cc310d2ad5992673a785a
>>>
>>> output-low - set the pin to output mode with low level
>>> output-high - set the pin to output mode with high level
>>> +sleep-hardware-state - indicate this is sleep related state which
>>> will be programmed
>>> + into the registers for the sleep state.
>>> slew-rate - set the slew rate
>>>
>>> This is another thing: here we are defining a state that will be managed
>>> by autonomous hardware. The state settings will be poked into some
>>> special registers that will automatically take effect when the system
>>> goes into sleep.
>>>
>>> This is a hardware-induced state: the SLEEP line for the entire SoC
>>> is asserted.
>>>
>>
>> Just to make sure I understand this property is used to specify a
>> pinctrl state that will be automatically applied by the hardware when
>> entering suspend?
>
> Yes. It is quite common in SoCs, we just never supported it properly.
This appears to be solving another possible problem/feature with pin
controllers during suspend, which is not exactly what I am after here.
Unless we generalize this into a state of some kind, which would
de-facto force a state transition in pinctrl_select_state() because
p->default != state, then I am not sure this how that is related to the
problem space exposed earlier.
>
>> Kind of an odd one, feels like something you
>> could just have the software apply as part of the suspend
>> process.
>
> Not really. It has special registers just for this purpose,
> and the driver is completely unaware that sleep is happening,
> instead it is driven to the hardware by special hardware sleep
> lines inside the SoC. So it needs to be set up when the default
> state is programmed.
>
>> Almost would have wondered should this be a driver
>> specific binding rather than a generic pinctrl one?
>
> No, I've seen it in several hardwares. (The Nomadik pin controller
> has this too.)
>
>> I guess from looking at the driver using this I assume that said
>> hardware also automatically replies the non-sleep settings on
>> resume?
>
> Yep.
>
> Yours,
> Linus Walleij
>
--
Florian
next prev parent reply other threads:[~2017-09-25 19:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 1:04 [PATCH 0/2] pinctrl: Allow indicating loss of state across suspend/resume Florian Fainelli
2017-09-21 1:04 ` [PATCH 1/2] pinctrl: Allow a device to indicate when to force a state Florian Fainelli
2017-09-22 11:55 ` Linus Walleij
2017-09-22 13:20 ` Charles Keepax
2017-09-22 13:57 ` Linus Walleij
2017-09-25 19:18 ` Florian Fainelli [this message]
[not found] ` <20170922132011.wssbhnsggteffgte-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-09-22 16:57 ` Florian Fainelli
2017-09-26 14:16 ` Charles Keepax
2017-09-26 17:51 ` Florian Fainelli
2017-09-27 8:26 ` Charles Keepax
2017-09-22 12:47 ` Charles Keepax
2017-09-22 16:45 ` Florian Fainelli
2017-09-21 1:04 ` [PATCH 2/2] pinctrl: single: Allow indicating loss of pin states during low-power Florian Fainelli
[not found] ` <20170921010421.7467-3-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-22 13:03 ` Linus Walleij
2017-09-25 19:15 ` Florian Fainelli
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=d6320101-d8a8-636c-83e9-a7c653c07ef3@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alcooperx@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=swarren@nvidia.com \
--cc=tony@atomide.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).