* [PATCH] pinctrl: dt-binding: fix generic pinmux/pinconf examples
@ 2015-03-15 6:55 Baruch Siach
2015-03-18 12:16 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2015-03-15 6:55 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio, Baruch Siach
pinconf_generic_dt_node_to_map() scans only subnodes of the pinctrl-0 pahndle,
not the referenced node itself. Change the example nodes to match.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
.../bindings/pinctrl/pinctrl-bindings.txt | 30 ++++++++++++++--------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 950580c92448..e9ebe5d35835 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -137,12 +137,16 @@ groups - the list of groups to select with this function
Example:
state_0_node_a {
- function = "uart0";
- groups = "u0rxtx", "u0rtscts";
+ uart0 {
+ function = "uart0";
+ groups = "u0rxtx", "u0rtscts";
+ };
};
state_1_node_a {
- function = "spi0";
- groups = "spi0pins";
+ spi0 {
+ function = "spi0";
+ groups = "spi0pins";
+ };
};
== Generic pin configuration node content ==
@@ -188,16 +192,22 @@ slew-rate - set the slew rate
For example:
state_0_node_a {
- pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
- bias-pull-up;
+ cts_rxd {
+ pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */
+ bias-pull-up;
+ };
};
state_1_node_a {
- pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */
- output-high;
+ rts_txd {
+ pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */
+ output-high;
+ };
};
state_2_node_a {
- group = "foo-group";
- bias-pull-up;
+ foo {
+ group = "foo-group";
+ bias-pull-up;
+ };
};
Some of the generic properties take arguments. For those that do, the
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: dt-binding: fix generic pinmux/pinconf examples
2015-03-15 6:55 [PATCH] pinctrl: dt-binding: fix generic pinmux/pinconf examples Baruch Siach
@ 2015-03-18 12:16 ` Linus Walleij
2015-03-18 12:25 ` Baruch Siach
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2015-03-18 12:16 UTC (permalink / raw)
To: Baruch Siach; +Cc: linux-gpio@vger.kernel.org
On Sun, Mar 15, 2015 at 7:55 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> pinconf_generic_dt_node_to_map() scans only subnodes of the pinctrl-0 pahndle,
> not the referenced node itself. Change the example nodes to match.
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Patch applied...
> state_0_node_a {
> - function = "uart0";
> - groups = "u0rxtx", "u0rtscts";
> + uart0 {
> + function = "uart0";
> + groups = "u0rxtx", "u0rtscts";
> + };
> };
> state_1_node_a {
> - function = "spi0";
> - groups = "spi0pins";
> + spi0 {
> + function = "spi0";
> + groups = "spi0pins";
> + };
> };
But that is a bit insane. We should fix the parsing code to handle
either case instead.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: dt-binding: fix generic pinmux/pinconf examples
2015-03-18 12:16 ` Linus Walleij
@ 2015-03-18 12:25 ` Baruch Siach
0 siblings, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2015-03-18 12:25 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio@vger.kernel.org
Hi Linus,
On Wed, Mar 18, 2015 at 01:16:00PM +0100, Linus Walleij wrote:
> On Sun, Mar 15, 2015 at 7:55 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> > pinconf_generic_dt_node_to_map() scans only subnodes of the pinctrl-0
> > pahndle, not the referenced node itself. Change the example nodes to
> > match.
> >
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>
> Patch applied...
>
> > state_0_node_a {
> > - function = "uart0";
> > - groups = "u0rxtx", "u0rtscts";
> > + uart0 {
> > + function = "uart0";
> > + groups = "u0rxtx", "u0rtscts";
> > + };
> > };
> > state_1_node_a {
> > - function = "spi0";
> > - groups = "spi0pins";
> > + spi0 {
> > + function = "spi0";
> > + groups = "spi0pins";
> > + };
> > };
>
> But that is a bit insane. We should fix the parsing code to handle
> either case instead.
OK. I'll take a look into this tomorrow.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-18 12:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 6:55 [PATCH] pinctrl: dt-binding: fix generic pinmux/pinconf examples Baruch Siach
2015-03-18 12:16 ` Linus Walleij
2015-03-18 12:25 ` Baruch Siach
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).