public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Dong Aisheng <dongas86@gmail.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Dong Aisheng-B29396 <B29396@freescale.com>,
	"Linus Walleij (linus.walleij@linaro.org)"
	<linus.walleij@linaro.org>,
	"Sascha Hauer (s.hauer@pengutronix.de)" <s.hauer@pengutronix.de>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"cjb@laptop.org" <cjb@laptop.org>,
	"Simon Glass (sjg@chromium.org)" <sjg@chromium.org>,
	"Grant Likely (grant.likely@secretlab.ca)" 
	<grant.likely@secretlab.ca>,
	"ext Tony Lindgren (tony@atomide.com)" <tony@atomide.com>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: An extremely simplified pinctrl bindings proposal
Date: Sun, 05 Feb 2012 21:44:46 -0800	[thread overview]
Message-ID: <4F2F68CE.3030208@nvidia.com> (raw)
In-Reply-To: <CAJuYYwQ2yczBh+CBFWohZPM+9jHXYxyxYzL8CS4puE96v4fDXw@mail.gmail.com>

On 02/05/2012 07:07 PM, Thomas Abraham wrote:
> Hi Stephen,
> 
> On 4 February 2012 21:31, Stephen Warren <swarren@nvidia.com> wrote:
>> Sorry, I haven't had a chance to read any of the pincrl emails from
>> Friday onwards. However, I thought a bit more about this, and decided
>> to propose someting much simpler:
>>
>> Thoughts:
>>
>> * Defining all the pins, groups, functions, ... takes a lot of space,
>>  whether it's in static data in pinctrl drivers or in the device tree.
>>  The lists must also be stored in RAM at runtime.
>>
>> * It's been very difficult to come up with a generic description of all
>>  pin controller's capabilities. This is true even irrespective of device
>>  tree; think pin config where we've agonized over whether we can create
>>  a standardized list of pin config properties, or need to allow each
>>  pinctrl driver to define its own set of properties, etc.
>>
>> * The only real use of the lists is for debugfs. Drivers shouldn't expect
>>  to directly request specific pinctrl settings, since that would encode
>>  knowledge of an individual SoC's pin controller. This should be
>>  abstracted from drivers.
>>
>> * The data in debugfs could easily be replaced by a raw register dump
>>  coupled with a SoC-specific script to print out what each register
>>  means.
>>
>> My proposal below is to radically simplify the pinctrl subsystem, and
>> make it little more than a system to execute a list of arbitrary register
>> writes.
> 
> Thanks for your work on pinctrl bindings proposal.
> 
> With this new approach, how much of the pinctrl susbystem is used in
> device tree mode.

Probably not a lot of the actual implementation. I'd assume that the
APIs called by device drivers would remain constant, or roughly so, in
order to still provide a simple interface for drivers.

> Last time I had proposed something similar to this
> (http://marc.info/?l=linux-kernel&m=132697880016289&w=2), you were not
> happy about that approach since the pinctrl subsystem is largely
> under-utilized (http://marc.info/?l=linux-kernel&m=132735884622374&w=2),
> expect for providing a interface which individual
> pinctrl/pinmux/pinconfig drivers will use to implement a function that
> programs the hardware.

That's true.

AS LinusW says in his later reply, losing the semantic representation in
the pinctrl system is a pity, which is the main reasoning behind my
previous response. However, I'm beginning to lean towards the simplicity
of something like a list of register writes trumping the lack of semantics.

> There need not be pinmux/pinctrl/pinconfig bindings that are designed
> for the linux pinctrl subsystem. DT allows specifying the
> pinconfig/pinmux properties in a simple way, which was not possible in
> non-dt case and hence the pinctrl subsystem. Other OS'es which might
> not have a pinctrl subsystem, similar to what linux has, should also
> find the pinctrl bindings useful.

True.

I think that pinctrl in a non-DT system probably could do something like
this DT binding proposal though, so we need not have DT/non-DT work
differently.

-- 
nvpublic

  reply	other threads:[~2012-02-06  5:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  5:31 An extremely simplified pinctrl bindings proposal Stephen Warren
2012-02-05  6:07 ` Richard Zhao
2012-02-06  3:07 ` Thomas Abraham
2012-02-06  5:44   ` Stephen Warren [this message]
2012-02-06  4:20 ` Linus Walleij
2012-02-06  5:53   ` Stephen Warren
2012-02-06 17:29     ` Linus Walleij
2012-02-06 19:03       ` Tony Lindgren
2012-02-06 19:56         ` Linus Walleij
2012-02-06 21:04           ` Tony Lindgren
2012-02-06 23:15             ` Linus Walleij
2012-02-06 23:57               ` Tony Lindgren
2012-02-07  1:07                 ` Linus Walleij
2012-02-07  5:28         ` Stephen Warren
2012-02-06 19:41     ` Mark Brown
2012-02-06 18:57 ` Tony Lindgren
2012-02-06 19:05 ` Mitch Bradley
2012-02-06 19:26   ` Linus Walleij
2012-02-06 21:24     ` Mitch Bradley
2012-02-07  5:33   ` Stephen Warren
2012-02-07  7:07     ` Mitch Bradley

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=4F2F68CE.3030208@nvidia.com \
    --to=swarren@nvidia.com \
    --cc=B29396@freescale.com \
    --cc=cjb@laptop.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dongas86@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=sjg@chromium.org \
    --cc=thomas.abraham@linaro.org \
    --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