提交 49e1f91c 编写于 作者: L Lad, Prabhakar 提交者: Linus Walleij

devicetree: bindings: gpio-davinic: fix documentation

This patch adds missing #gpio-cells and also adds a
usage example for leds.
Reported-by: NAlexander Holler <holler@ahsoftware.de>
Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 758afe42
...@@ -8,6 +8,10 @@ Required Properties: ...@@ -8,6 +8,10 @@ Required Properties:
- gpio-controller : Marks the device node as a gpio controller. - 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. - interrupt-parent: phandle of the parent interrupt controller.
- interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are
...@@ -27,6 +31,7 @@ Example: ...@@ -27,6 +31,7 @@ Example:
gpio: gpio@1e26000 { gpio: gpio@1e26000 {
compatible = "ti,dm6441-gpio"; compatible = "ti,dm6441-gpio";
gpio-controller; gpio-controller;
#gpio-cells = <2>;
reg = <0x226000 0x1000>; reg = <0x226000 0x1000>;
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH
...@@ -39,3 +44,19 @@ gpio: gpio@1e26000 { ...@@ -39,3 +44,19 @@ gpio: gpio@1e26000 {
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #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>;
...
};
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册