linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Stephen Warren <swarren@nvidia.com>,
	Kevin Hilman <khilman@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] pinctrl: document the pinctrl PM states
Date: Thu, 20 Jun 2013 13:26:54 -0600	[thread overview]
Message-ID: <51C3577E.6040709@wwwdotorg.org> (raw)
In-Reply-To: <20130620063823.GD5523@atomide.com>

On 06/20/2013 12:38 AM, Tony Lindgren wrote:
> * Stephen Warren <swarren@wwwdotorg.org> [130619 13:08]:
>> On 06/17/2013 01:20 AM, Tony Lindgren wrote:
...
>>> Below are the pin remuxing cases I'm aware of:
>> ...
>>> Then for dealing with the above examples, I think we already have a
>>> pretty good setup in pinctrl framework to deal with this with the
>>> named modes. But I think that to do this properly with the named
>>> modes we should have named modes like the following:
>>>
>>> "static" && ("active" || "idle")
>>> "static" && ("rx" || "tx")
>>>
>>> Here the "static" pins would be set during driver probe and never
>>> need to change until the driver is unloaded. This is close to what we
>>> currently call "default". But we should probably make it clear that
>>> these will not change to avoid confusion. See below for more info.
>>>
>>> The the non-static states like "active"/"idle", or "rx"/"tx", can
>>> be set in addition to "static", but they should not be subsets of
>>> "static" to avoid the issues Stephen described earlier. This way we
>>> allow the named modes to do the work for us while protecting the
>>> claimed pins.
>>
>> Yes, I think this can certainly work conceptually. It's equivalent to
>> pre-computing which parts of the overall state don't change between the
>> currently-defined "global" active/idle states and then applying the
>> diffs at runtime - rather like what I suggested before, but without the
>> pinctrl code having to do the diff at runtime. I'm not sure if I have
>> (yet) a strong opinion on whether allowing multiple states to be active
>> at once (i.e. static plus active) is the correct way to go. Maybe once
>> I've finished reading the thread...
> 
> I don't think there's any issue for having multiple sets active the same
> is an issue, we're already doing it quite a bit although for different
> device drivers so we have the framework ready for that already.

I assume you mean there shouldn't be any issue *modifying* the pinctrl
API to allow multiple states to be active at once? And where you're
talking about having multiple sets active at once already, you're
talking about some other API?

Right now, pinctrl_select_state() de-activates the old state while
activating the new state, so it's not possible to have more than one
active at once.

  reply	other threads:[~2013-06-20 19:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 19:59 [PATCH] pinctrl: document the pinctrl PM states Linus Walleij
2013-06-12 18:37 ` Tony Lindgren
2013-06-13 19:39 ` Stephen Warren
2013-06-13 20:34   ` Linus Walleij
2013-06-14 15:43     ` Stephen Warren
2013-06-16 10:17       ` Linus Walleij
2013-06-17  7:20       ` Tony Lindgren
2013-06-17 15:56         ` Linus Walleij
2013-06-17 18:06           ` Tony Lindgren
2013-06-17 18:15           ` Rohit Vaswani
2013-06-17 16:05         ` Linus Walleij
2013-06-17 18:02           ` Tony Lindgren
2013-06-19 20:06             ` Stephen Warren
2013-06-24 12:37             ` Linus Walleij
2013-06-25  7:31               ` Tony Lindgren
2013-06-19 20:02         ` Stephen Warren
2013-06-20  6:38           ` Tony Lindgren
2013-06-20 19:26             ` Stephen Warren [this message]
2013-06-21  6:25               ` Tony Lindgren
2013-06-21 19:12                 ` Stephen Warren
2013-06-24 10:10                   ` Tony Lindgren
2013-06-24 18:09                     ` Stephen Warren
2013-06-25  7:38                       ` Tony Lindgren

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=51C3577E.6040709@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=khilman@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@nvidia.com \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    /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).