devicetree: bindings: gpio-davinic: fix documentation
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Thu, 6 Mar 2014 05:58:25 +0000 (11:28 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 11 Mar 2014 10:20:01 +0000 (11:20 +0100)
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/devicetree/bindings/gpio/gpio-davinci.txt

index 4ce9862308ad86e4bbdeb16a4fc54b9cae6a53c1..5079ba7d65681dfa0b48a3874de414fec9a99189 100644 (file)
@@ -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>;
+               ...
+       };
+};