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 v4 5/9] document: devicetree: bind pinconf with pin-single
Date: Mon, 12 Nov 2012 13:37:32 -0700	[thread overview]
Message-ID: <50A15E0C.2010903@wwwdotorg.org> (raw)
In-Reply-To: <1352301582-12244-6-git-send-email-haojian.zhuang@gmail.com>

On 11/07/2012 08:19 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

>  Required properties:
> -- compatible : "pinctrl-single"
> +- compatible : "pinctrl-single" or "pinconf-single".
> +  "pinctrl-single" means that pinconf isn't supported.
> +  "pinconf-single" means that generic pinconf is supported.
>  
>  - reg : offset and length of the register set for the mux registers
>  
> @@ -14,9 +16,33 @@ Optional properties:
>  - pinctrl-single,function-off : function off mode for disabled state if
>    available and same for all registers; if not specified, disabling of
>    pin functions is ignored
> +
>  - pinctrl-single,bit-per-mux : boolean to indicate that one register controls
>    more than one pin
>  
> +- 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

Isn't power-source an enumeration? As such, shouldn't the pinctrl state
definition supply the value, rather than the pin controller definition?

The above two properties imply to me that you're saying "these bits
(power-source-mask) in any pin register must be set to this one value
(power-source)". However, I think you want to say "these bits
(power-source-mask) are used to configure the power source", and then
allow the state nodes (what's reference from pinctrl client devices'
pinctrl-n properties) to define the value.

Perhaps that's your intent already, but if so, the properties for the
two different nodes should be documented separately, not all interleaved
in a single list, without any indication of which node they get put into.

> +- pinctrl-single,bias-mask : mask of setting bias value in the pinmux
> +  register
> +
> +- pinctrl-single,bias-disable : value of disabling bias in the pinmux
> +  register
> +
> +- pinctrl-single,bias-pull-down : value of setting bias pull down in
> +  the pinmux register
> +
> +- pinctrl-single,bias-pull-up : value of setting bias pull up in the
> +  pinmux register
> +
> +- pinctrl-single,bias : value of setting bias in the pinmux register

If there are bias-disable, bias-pull-down, and bias-pull-up properties,
what is the plain "bias" property for?

> +- pinctrl-single,input-schmitt-mask : mask of setting input schmitt
> +  in the pinmux register

And if the "value" properties go into the pinctrl state nodes, why isn't
there a "value" property for schmitt?

> +Optional sub-node: In case some pins could be configured as GPIO in the pinmux
> +register. If both GPIO nubmer and pin base of those pins are in ascending order,
> +those pins could be defined as a GPIO range. The sub-node should be defined in
> +.dtsi files of those silicons.

Pinctrl state definitions are also nodes directly inside the pin
controller node. How does the pin controller driver know whether a child
node is a state definition, or a GPIO range? Is the node required to
have some specific name?

  parent reply	other threads:[~2012-11-12 20:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 15:19 [PATCH v4 0/9] use pinctrl-single in arch mmp Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 1/9] ARM: mmp: select pinctrl driver Haojian Zhuang
2012-11-08  1:38   ` Tony Lindgren
2012-11-10 14:53     ` Haojian Zhuang
2012-11-13 13:37       ` Linus Walleij
2012-11-07 15:19 ` [PATCH v4 2/9] pinctrl: single: support gpio request and free Haojian Zhuang
2012-11-07 22:27   ` Tony Lindgren
2012-11-13 13:07     ` Linus Walleij
2012-11-13 17:34       ` Tony Lindgren
2012-11-14  1:44         ` Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 3/9] pinctrl: single: support pinconf generic Haojian Zhuang
2012-11-08  0:25   ` Tony Lindgren
2012-11-08 22:55   ` Tony Lindgren
2012-11-08 23:13     ` Tony Lindgren
2012-11-09 21:53   ` Tony Lindgren
2012-11-07 15:19 ` [PATCH v4 4/9] ARM: dts: support pinctrl single in pxa910 Haojian Zhuang
2012-11-09 22:48   ` Tony Lindgren
2012-11-10  5:37     ` Haojian Zhuang
2012-11-10 20:04       ` Tony Lindgren
2012-11-07 15:19 ` [PATCH v4 5/9] document: devicetree: bind pinconf with pin-single Haojian Zhuang
2012-11-08  1:37   ` Tony Lindgren
2012-11-12 20:37   ` Stephen Warren [this message]
2012-11-15  8:27     ` Haojian Zhuang
2012-11-15  8:30     ` Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 6/9] tty: pxa: configure pin Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 7/9] i2c: pxa: use devm_kzalloc Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 8/9] i2c: pxa: configure pinmux Haojian Zhuang
2012-11-07 15:19 ` [PATCH v4 9/9] pinctrl: single: dump pinmux register value Haojian Zhuang
2012-11-08  1:25   ` Tony Lindgren
2012-11-13 13:08     ` Linus Walleij
2012-11-13 17:34       ` Tony Lindgren
2012-11-14  1:45         ` Haojian Zhuang
2012-11-15 14:11           ` Linus Walleij

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=50A15E0C.2010903@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.