All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/9] document: devicetree: bind pinconf with pin-single
Date: Wed, 31 Oct 2012 16:26:50 -0600	[thread overview]
Message-ID: <5091A5AA.7000207@wwwdotorg.org> (raw)
In-Reply-To: <CAN1soZy8xXGs8zEiZV0kV0dGVdXfZ9ogx83sFgPG76d0i8yH4A@mail.gmail.com>

On 10/31/2012 10:58 AM, Haojian Zhuang wrote:
> On Tue, Oct 23, 2012 at 6:44 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 10/22/2012 10:08 AM, Haojian Zhuang wrote:
>>> Add comments with pinconf & gpio range in the document of
>>> pinctrl-single.
...
>>> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
...
>>> @@ -17,6 +17,36 @@ Optional properties:
>>>  - pinctrl-single,bit-per-mux : boolean to indicate that one register controls
>>>    more than one pin
>>>
>>> +- pinctrl-single,gpio-ranges : gpio range list
>>> +
>>> +- pinctrl-single,gpio : array with gpio range start, size & register
>>> +  offset
>>> +
>>> +- pinctrl-single,gpio-func : gpio function value in the pinmux register
...
>> 2) pinctrl-single,gpio is listed as optional. Presumably it's not; every
>> GPIO range node must have this property?
>>
> Yes, they must be included in GPIO range node. But if GPIO feature
> isn't supported in the pinctrl device, pinctrl-single,gpio is still optional.
> I'll add more comments on this.
> 
>> 3) Why is pinctrl-single,gpio-func optional? Presumably you always need
>> to program the pinmux HW to select the GPIO function. Yet, the driver
>> code in an earlier patch seems to deliberately do nothing if this
>> property is missing. Shouldn't the DT parsing return an error instead?
>>
> pinctrl-single,gpio-func is optional for above reason.

Presumably the node that contains the pinctrl-single,gpio-func property
is optional, but once you have such a node, pinctrl-single,gpio-func is
required?

>>> +- pinctrl-single,power-source-mask : mask of setting power source in
>>> +  the pinmux register
>>> +
>>> +- pinctrl-single,power-source : value of setting power source field
>>> +  in the pinmux register
...
>> I suppose it's OK that a generic pin controller binding would use the
>> generic pin configuration config options. I'm still not convinced that
>> the semantics of generic pin control make sense. Maybe if they're just
>> arbitrary names for SoC-specific things it's fine though.
>>
>> Do these patches expose /all/ generic pin configuration options? It
>> doesn't seem worth exposing only some of them and ignoring others.
>
> I believe general pinconf can't support all cases in different silicons.

I tend to agree.

> And we still have some common features that could be covered in general
> pinconf. So we need a structure to support both pinconf & specific pinconf.

But that tends to imply that adding support for generic pinconf into the
pinctrl-simple driver isnt' actually going to be useful for anyone. If
pinctrl-single only supports some part of your HW, how can you use it?
Or, do you intend to somehow make pinctrl-single support both the common
generic pinconf stuff, and somehow be extensible to support any
SoC-specific pin config fields?

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Haojian Zhuang <haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v2 5/9] document: devicetree: bind pinconf with pin-single
Date: Wed, 31 Oct 2012 16:26:50 -0600	[thread overview]
Message-ID: <5091A5AA.7000207@wwwdotorg.org> (raw)
In-Reply-To: <CAN1soZy8xXGs8zEiZV0kV0dGVdXfZ9ogx83sFgPG76d0i8yH4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 10/31/2012 10:58 AM, Haojian Zhuang wrote:
> On Tue, Oct 23, 2012 at 6:44 AM, Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote:
>> On 10/22/2012 10:08 AM, Haojian Zhuang wrote:
>>> Add comments with pinconf & gpio range in the document of
>>> pinctrl-single.
...
>>> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
...
>>> @@ -17,6 +17,36 @@ Optional properties:
>>>  - pinctrl-single,bit-per-mux : boolean to indicate that one register controls
>>>    more than one pin
>>>
>>> +- pinctrl-single,gpio-ranges : gpio range list
>>> +
>>> +- pinctrl-single,gpio : array with gpio range start, size & register
>>> +  offset
>>> +
>>> +- pinctrl-single,gpio-func : gpio function value in the pinmux register
...
>> 2) pinctrl-single,gpio is listed as optional. Presumably it's not; every
>> GPIO range node must have this property?
>>
> Yes, they must be included in GPIO range node. But if GPIO feature
> isn't supported in the pinctrl device, pinctrl-single,gpio is still optional.
> I'll add more comments on this.
> 
>> 3) Why is pinctrl-single,gpio-func optional? Presumably you always need
>> to program the pinmux HW to select the GPIO function. Yet, the driver
>> code in an earlier patch seems to deliberately do nothing if this
>> property is missing. Shouldn't the DT parsing return an error instead?
>>
> pinctrl-single,gpio-func is optional for above reason.

Presumably the node that contains the pinctrl-single,gpio-func property
is optional, but once you have such a node, pinctrl-single,gpio-func is
required?

>>> +- pinctrl-single,power-source-mask : mask of setting power source in
>>> +  the pinmux register
>>> +
>>> +- pinctrl-single,power-source : value of setting power source field
>>> +  in the pinmux register
...
>> I suppose it's OK that a generic pin controller binding would use the
>> generic pin configuration config options. I'm still not convinced that
>> the semantics of generic pin control make sense. Maybe if they're just
>> arbitrary names for SoC-specific things it's fine though.
>>
>> Do these patches expose /all/ generic pin configuration options? It
>> doesn't seem worth exposing only some of them and ignoring others.
>
> I believe general pinconf can't support all cases in different silicons.

I tend to agree.

> And we still have some common features that could be covered in general
> pinconf. So we need a structure to support both pinconf & specific pinconf.

But that tends to imply that adding support for generic pinconf into the
pinctrl-simple driver isnt' actually going to be useful for anyone. If
pinctrl-single only supports some part of your HW, how can you use it?
Or, do you intend to somehow make pinctrl-single support both the common
generic pinconf stuff, and somehow be extensible to support any
SoC-specific pin config fields?

  reply	other threads:[~2012-10-31 22:26 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-22 16:08 [PATCH v2 0/9] support pinctrl single in arch pxa/mmp Haojian Zhuang
2012-10-22 16:08 ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 1/9] ARM: mmp: select pinctrl driver Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-23 10:05   ` Linus Walleij
2012-10-23 10:05     ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 2/9] pinctrl: single: support gpio request and free Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 20:28   ` Tony Lindgren
2012-10-22 20:28     ` Tony Lindgren
2012-10-22 21:37     ` Tony Lindgren
2012-10-22 21:37       ` Tony Lindgren
2012-10-29  1:55       ` Haojian Zhuang
2012-10-29  1:55         ` Haojian Zhuang
2012-10-29  1:58     ` Haojian Zhuang
2012-10-29  1:58       ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 3/9] pinctrl: single: support pinconf generic Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 4/9] ARM: dts: support pinctrl single in pxa910 Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 5/9] document: devicetree: bind pinconf with pin-single Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 22:44   ` Stephen Warren
2012-10-22 22:44     ` Stephen Warren
2012-10-31 16:58     ` Haojian Zhuang
2012-10-31 16:58       ` Haojian Zhuang
2012-10-31 22:26       ` Stephen Warren [this message]
2012-10-31 22:26         ` Stephen Warren
2012-10-31 22:51         ` Haojian Zhuang
2012-10-31 22:51           ` Haojian Zhuang
2012-11-01  0:25           ` Tony Lindgren
2012-11-01  0:25             ` Tony Lindgren
2012-10-22 16:08 ` [PATCH v2 6/9] tty: pxa: configure pin Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-23 10:07   ` Linus Walleij
2012-10-23 10:07     ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 7/9] i2c: pxa: use devm_kzalloc Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 16:08 ` [PATCH v2 8/9] i2c: pxa: configure pinmux Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-23 10:07   ` Linus Walleij
2012-10-23 10:07     ` Linus Walleij
2012-10-22 16:08 ` [PATCH v2 9/9] pinctrl: single: dump pinmux register value Haojian Zhuang
2012-10-22 16:08   ` Haojian Zhuang
2012-10-22 22:27   ` Tony Lindgren
2012-10-22 22:27     ` 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=5091A5AA.7000207@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.