diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2014-03-06 00:58:25 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-03-11 06:20:01 -0400 |
commit | 49e1f91cd581acec0ef30ac2860fcdd5e51a6d05 (patch) | |
tree | bc48eeeddf3bfc5856dee9c84d39a56e508de4bd | |
parent | 758afe429c501924ac650ad667fd79f4bb06c05a (diff) |
devicetree: bindings: gpio-davinic: fix documentation
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>
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-davinci.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt index 4ce9862308ad..5079ba7d6568 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt | |||
@@ -8,6 +8,10 @@ Required Properties: | |||
8 | 8 | ||
9 | - gpio-controller : Marks the device node as a gpio controller. | 9 | - gpio-controller : Marks the device node as a gpio controller. |
10 | 10 | ||
11 | - #gpio-cells : Should be two. | ||
12 | - first cell is the pin number | ||
13 | - second cell is used to specify optional parameters (unused) | ||
14 | |||
11 | - interrupt-parent: phandle of the parent interrupt controller. | 15 | - interrupt-parent: phandle of the parent interrupt controller. |
12 | 16 | ||
13 | - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are | 17 | - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are |
@@ -27,6 +31,7 @@ Example: | |||
27 | gpio: gpio@1e26000 { | 31 | gpio: gpio@1e26000 { |
28 | compatible = "ti,dm6441-gpio"; | 32 | compatible = "ti,dm6441-gpio"; |
29 | gpio-controller; | 33 | gpio-controller; |
34 | #gpio-cells = <2>; | ||
30 | reg = <0x226000 0x1000>; | 35 | reg = <0x226000 0x1000>; |
31 | interrupt-parent = <&intc>; | 36 | interrupt-parent = <&intc>; |
32 | interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH | 37 | interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH |
@@ -39,3 +44,19 @@ gpio: gpio@1e26000 { | |||
39 | interrupt-controller; | 44 | interrupt-controller; |
40 | #interrupt-cells = <2>; | 45 | #interrupt-cells = <2>; |
41 | }; | 46 | }; |
47 | |||
48 | leds { | ||
49 | compatible = "gpio-leds"; | ||
50 | |||
51 | led1 { | ||
52 | label = "davinci:green:usr1"; | ||
53 | gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
54 | ... | ||
55 | }; | ||
56 | |||
57 | led2 { | ||
58 | label = "davinci:red:debug1"; | ||
59 | gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; | ||
60 | ... | ||
61 | }; | ||
62 | }; | ||