* [PATCH] devicetree: bindings: gpio-davinic: fix documentation
@ 2014-03-06 5:58 Prabhakar Lad
2014-03-11 10:21 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar Lad @ 2014-03-06 5:58 UTC (permalink / raw)
To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Rob Landley, Linus Walleij, Grygorii Strashko, devicetree
Cc: LKML, linux-doc, Lad Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
This patch adds missing #gpio-cells and also adds a
usage example for leds.
Reported-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
.../devicetree/bindings/gpio/gpio-davinci.txt | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
index 4ce9862..5079ba7 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
@@ -8,6 +8,10 @@ Required Properties:
- gpio-controller : Marks the device node as a gpio controller.
+- #gpio-cells : Should be two.
+ - first cell is the pin number
+ - second cell is used to specify optional parameters (unused)
+
- interrupt-parent: phandle of the parent interrupt controller.
- interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are
@@ -27,6 +31,7 @@ Example:
gpio: gpio@1e26000 {
compatible = "ti,dm6441-gpio";
gpio-controller;
+ #gpio-cells = <2>;
reg = <0x226000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH
@@ -39,3 +44,19 @@ gpio: gpio@1e26000 {
interrupt-controller;
#interrupt-cells = <2>;
};
+
+leds {
+ compatible = "gpio-leds";
+
+ led1 {
+ label = "davinci:green:usr1";
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ ...
+ };
+
+ led2 {
+ label = "davinci:red:debug1";
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ ...
+ };
+};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] devicetree: bindings: gpio-davinic: fix documentation
2014-03-06 5:58 [PATCH] devicetree: bindings: gpio-davinic: fix documentation Prabhakar Lad
@ 2014-03-11 10:21 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-03-11 10:21 UTC (permalink / raw)
To: Prabhakar Lad
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Rob Landley, Grygorii Strashko, devicetree@vger.kernel.org, LKML,
linux-doc@vger.kernel.org
On Thu, Mar 6, 2014 at 6:58 AM, Prabhakar Lad
<prabhakar.csengg@gmail.com> wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> This patch adds missing #gpio-cells and also adds a
> usage example for leds.
>
> Reported-by: Alexander Holler <holler@ahsoftware.de>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Thanks, patch applied.
Note:
> + - second cell is used to specify optional parameters (unused)
(...)
> + gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
So you're using the unused cell.
However it is maybe nice to put things like that in there as it
sort of documents the system so whatever.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-11 10:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 5:58 [PATCH] devicetree: bindings: gpio-davinic: fix documentation Prabhakar Lad
2014-03-11 10:21 ` Linus Walleij
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).