diff mbox

[1/5] dts: gpio_atmel: adapt binding doc to reality

Message ID 20170526180609.2699-1-uwe@kleine-koenig.org
State New
Headers show

Commit Message

Uwe Kleine-König May 26, 2017, 6:06 p.m. UTC
The second cell in a gpio reference is used to pass GPIO_ACTIVE_LOW or
GPIO_ACTIVE_HIGH. The gpio device can also be used as irq controller and
a reference can contain the IRQ_TYPE_* values in the second cell.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Andrew Lunn May 26, 2017, 6:52 p.m. UTC | #1
> +- interrupt-controller: Marks the device node as a GPIO controller.

Interrupt controller, not GPIO controller.

> +- #interrupt-cells: Should be two. The first cell is the pin number and the
> +  second cell is used to specify irq type flags:
> +      1 = low-to-high edge triggered.
> +      2 = high-to-low edge triggered.
> +      4 = active high level-sensitive.
> +      8 = active low level-sensitive.

Maybe just reference interrupts.txt?

      Andrew
Alexandre Belloni May 31, 2017, 9:52 a.m. UTC | #2
On 26/05/2017 at 21:07:03 +0200, Uwe Kleine-König wrote:
> The second cell in a gpio reference is used to pass GPIO_ACTIVE_LOW or
> GPIO_ACTIVE_HIGH. The gpio device can also be used as irq controller and
> a reference can contain the IRQ_TYPE_* values in the second cell.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> On Fri, May 26, 2017 at 08:52:14PM +0200, Andrew Lunn wrote:
> > > +- interrupt-controller: Marks the device node as a GPIO controller.
> > 
> > Interrupt controller, not GPIO controller.
> > 
> > > +- #interrupt-cells: Should be two. The first cell is the pin number and the
> > > +  second cell is used to specify irq type flags:
> > > +      1 = low-to-high edge triggered.
> > > +      2 = high-to-low edge triggered.
> > > +      4 = active high level-sensitive.
> > > +      8 = active low level-sensitive.
> > 
> > Maybe just reference interrupts.txt?
> 
> ack for both and changed in this v2.
> 
> Thanks
> Uwe
> 
>  Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
Applied, thanks.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
index 85f8c0d084fa..b53fe3bce270 100644
--- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
@@ -5,9 +5,16 @@  Required properties:
 - reg: Should contain GPIO controller registers location and length
 - interrupts: Should be the port interrupt shared by all the pins.
 - #gpio-cells: Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify optional parameters to declare if the GPIO
+  is active high or low. See gpio.txt.
 - gpio-controller: Marks the device node as a GPIO controller.
+- interrupt-controller: Marks the device node as a GPIO controller.
+- #interrupt-cells: Should be two. The first cell is the pin number and the
+  second cell is used to specify irq type flags:
+      1 = low-to-high edge triggered.
+      2 = high-to-low edge triggered.
+      4 = active high level-sensitive.
+      8 = active low level-sensitive.
 
 optional properties:
 - #gpio-lines: Number of gpio if absent 32.
@@ -21,5 +28,7 @@  Example:
 		#gpio-cells = <2>;
 		gpio-controller;
 		#gpio-lines = <19>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
 	};