Hi Alexander, On Fri, Feb 28, 2014 at 2:56 PM, Sekhar Nori <nsek...@ti.com> wrote: > + Prabhakar > > On Tuesday 25 February 2014 08:54 PM, Alexander Holler wrote: >> Hello, >> >> I've seen kernel 3.14-rc contains support for gpios using devicetree. >> >> I've two comments: >> >> 1. #gpio-cells seems to be missing, >> 2. a small usage example (e.g. with gpio-leds or gpio-keys) would be nice. >> Yes #gpio-cells is missing, you can refer following patch fixing it,
Regards, --Prabhakar Lad -----X------------X >From e8e96492926fe74012bb8ae8163411405a12057c Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" <prabhakar.cse...@gmail.com> Date: Fri, 28 Feb 2014 19:15:22 +0530 Subject: [PATCH] devicetree: bindings: gpio-davinci: fix documentation This patch adds missing #gpio-cells and also adds a usage example. Reported-by: Alexander Holler <hol...@ahsoftware.de> Signed-off-by: Lad, Prabhakar <prabhakar.cse...@gmail.com> --- .../devicetree/bindings/gpio/gpio-davinci.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt index a2e839d..fb96b94 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,16 @@ gpio: gpio@1e26000 { interrupt-controller; #interrupt-cells = <2>; }; + +leds { + compatible = "gpio-leds"; + led1 { + label = "davinci:green:usr1"; + gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + }; + + led2 { + label = "davinci:red:debug1"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + }; +}; -- 1.7.9.5 _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source