dts: gpio_atmel: adapt binding doc to reality
PATCH 1/5 dts: gpio_atmel: adapt binding doc to reality
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.
--- Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/gpio/gpio_atmel.txt +11 -2
@@ -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>; };
Signature · 1 line
2.11.0
RFC PATCH 2/5 ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
According to the binding documentation and the source code the omap-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually IRQ_TYPE_LEVEL_LOW is intended by the dt author.
---
Hello,
can somebody with the hardware or it's documentation please check which flag is the right one?
Best regards
Uwe
arch/arm/boot/dts/am335x-baltos-ir3220.dts | 2 +- arch/arm/boot/dts/am335x-baltos-ir5221.dts | 2 +- arch/arm/boot/dts/am335x-baltos.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/am335x-baltos-ir3220.dts +1 -1
@@ -84,7 +84,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio0>; - interrupts = <20 GPIO_ACTIVE_LOW>; + interrupts = <20 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&tca6416_pins>; };
arch/arm/boot/dts/am335x-baltos-ir5221.dts +1 -1
@@ -93,7 +93,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio0>; - interrupts = <20 GPIO_ACTIVE_LOW>; + interrupts = <20 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&tca6416_pins>; };
arch/arm/boot/dts/am335x-baltos.dtsi +1 -1
@@ -249,7 +249,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio1>; - interrupts = <28 GPIO_ACTIVE_LOW>; + interrupts = <28 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&tps65910_pins>; };
Signature · 1 line
2.11.0
RFC PATCH 2/5 ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
Quoted 7 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the omap-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.
Quoted 6 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,can somebody with the hardware or it's documentation please check which flag is the right one?
I'll wait on this one until we have somebody test it.
Regards,
Tony
RFC PATCH 2/5 ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
Hi Uwe, Tony,
Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the omap-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,can somebody with the hardware or it's documentation please check which flag is the right one?
I'll wait on this one until we have somebody test it.
I'll look at it this week.
Yegor
RFC PATCH 2/5 ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
Quoted 15 lines · Yegor Yefremov
Hi Uwe, Tony,
Quoted 12 lines · Tony Lindgren
Quoted 11 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the omap-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
can somebody with the hardware or it's documentation please check which flag is the right one?
I'll wait on this one until we have somebody test it.
I'll look at it this week.
This is what works for me (at least it doesn't produce "irq 88: nobody cared (try booting with the "irqpoll" option)").
As for tca6416 it is working with all possible settings (from IRQ_TYPE_EDGE_RISING till IRQ_TYPE_LEVEL_LOW). "cat /proc/interrupts" always shows Level type:
47: 5 44e07000.gpio 20 Level 1-0020
(quoted diff) +0 -0
b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
index 1b215c4..944b095 100644
arch/arm/boot/dts/am335x-baltos-ir3220.dts +1 -1
@@ -85,7 +85,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio0>; - interrupts = <20 IRQ_TYPE_EDGE_RISING>; + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&tca6416_pins>; };
(quoted diff) +0 -0
b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
index 832ead8..ae5692b 100644
arch/arm/boot/dts/am335x-baltos-ir5221.dts +1 -1
@@ -94,7 +94,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio0>; - interrupts = <20 IRQ_TYPE_EDGE_RISING>; + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&tca6416_pins>; };
(quoted diff) +0 -0
b/arch/arm/boot/dts/am335x-baltos.dtsi
index e3234d4..863942d 100644
arch/arm/boot/dts/am335x-baltos.dtsi +1 -1
@@ -249,7 +249,7 @@ gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio1>; - interrupts = <28 IRQ_TYPE_EDGE_RISING>; + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; pinctrl-names = "default"; pinctrl-0 = <&tps65910_pins>; };
Yegor
RFC PATCH 2/5 ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
Quoted 24 lines · Yegor Yefremov
Quoted 15 lines · Yegor Yefremov
Hi Uwe, Tony,
Quoted 12 lines · Tony Lindgren
Quoted 11 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the omap-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
can somebody with the hardware or it's documentation please check which flag is the right one?
I'll wait on this one until we have somebody test it.
I'll look at it this week.
Quoted 8 lines
This is what works for me (at least it doesn't produce "irq 88: nobody cared (try booting with the "irqpoll" option)").
As for tca6416 it is working with all possible settings (from
IRQ_TYPE_EDGE_RISINGtillIRQ_TYPE_LEVEL_LOW). "cat/proc/interrupts" always shows Level type:47: 5 44e07000.gpio 20 Level 1-0020
OK, can you please send a proper patch with description and Signed-off-by? That is unless Uwe cares to update his patch. Otherwise add Reported-by for Uwe :)
Regards,
Tony
RFC PATCH 3/5 ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
In reply to Uwe Kleine-KönigAccording to the binding documentation and the source code the atmel-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually IRQ_TYPE_LEVEL_LOW is intended by the dt author.
---
Hello,
can somebody with the hardware or it's documentation please check which flag is the right one?
Best regards
Uwe
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi +2 -2
@@ -75,7 +75,7 @@ reg = <0>; clocks = <&clk20m>; interrupt-parent = <&pioE>; - interrupts = <6 GPIO_ACTIVE_LOW>; + interrupts = <6 IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; };
@@ -84,7 +84,7 @@ reg = <1>; clocks = <&clk20m>; interrupt-parent = <&pioE>; - interrupts = <7 GPIO_ACTIVE_LOW>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; }; };
Signature · 1 line
2.11.0
RFC PATCH 3/5 ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
Quoted 7 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the atmel-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.
Quoted 6 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,can somebody with the hardware or it's documentation please check which flag is the right one?
It's correct, I tested the CAN, so:
Quoted 29 lines
Best regards
Uwearch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi +2
-2@@ -75,7 +75,7 @@ reg = <0>; clocks = <&clk20m>; interrupt-parent = <&pioE>; - interrupts = <6 GPIO_ACTIVE_LOW>; + interrupts = <6 IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; };@@ -84,7 +84,7 @@ reg = <1>; clocks = <&clk20m>; interrupt-parent = <&pioE>; - interrupts = <7 GPIO_ACTIVE_LOW>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; }; };
Signature · 2 lines
Best regards, Marek Vasut
Alexandre Belloni
AppliedRFC PATCH 3/5 ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the atmel-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,
Quoted 13 lines
Quoted 2 lines
can somebody with the hardware or it's documentation please check which flag is the right one?
It's correct, I tested the CAN, so:
Acked-by Marek Vasut <[email protected]>Quoted 6 lines
Best regards
Uwearch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
RFC PATCH 4/5 ARM: dts: tegra: use IRQ_TYPE_* to specify irq flags
In reply to Uwe Kleine-KönigAccording to the binding documentation and the source code the tegra gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually IRQ_TYPE_LEVEL_LOW is intended by the dt author.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124-venice2.dts | 2 +- arch/arm/boot/dts/tegra30-apalis.dtsi | 4 ++-- arch/arm/boot/dts/tegra30-beaver.dts | 2 +- arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 3 ++- 6 files changed, 8 insertions(+), 7 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +1 -1
@@ -779,7 +779,7 @@ compatible = "realtek,rt5640"; reg = <0x1c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>; + interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_NONE>; realtek,ldo1-en-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
@@ -1413,7 +1413,7 @@ compatible = "realtek,rt5639"; reg = <0x1c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>; + interrupts = <TEGRA_GPIO(H, 4) IRQ_TYPE_NONE>; realtek,ldo1-en-gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra124-venice2.dts +1 -1
@@ -612,7 +612,7 @@ compatible = "maxim,max98090"; reg = <0x10>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>; + interrupts = <TEGRA_GPIO(H, 4) IRQ_TYPE_NONE>; }; };
arch/arm/boot/dts/tegra30-apalis.dtsi +2 -2
@@ -656,7 +656,7 @@ reg = <1>; clocks = <&clk16m>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_LOW>; + interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; }; };
@@ -671,7 +671,7 @@ reg = <0>; clocks = <&clk16m>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; + interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; }; };
arch/arm/boot/dts/tegra30-beaver.dts +1 -1
@@ -1761,7 +1761,7 @@ compatible = "realtek,rt5640"; reg = <0x1c>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(X, 3) GPIO_ACTIVE_HIGH>; + interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_NONE>; realtek,ldo1-en-gpios = <&gpio TEGRA_GPIO(X, 2) GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +2 -1
@@ -78,9 +78,10 @@ reg = <0>; clocks = <&clk16m>; interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>; + interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_RISING>; spi-max-frequency = <10000000>; }; + spidev0: spi at 1 { compatible = "spidev"; reg = <1>;
Signature · 1 line
2.11.0
RFC PATCH 5/5 ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
In reply to Uwe Kleine-KönigAccording to the binding documentation and the source code the vf610-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually IRQ_TYPE_LEVEL_LOW is intended by the dt author.
---
Hello,
can somebody with the hardware or it's documentation please check which flag is the right one?
Best regards
Uwe
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi +1 -1
@@ -117,7 +117,7 @@ clocks = <&clk16m>; spi-max-frequency = <10000000>; interrupt-parent = <&gpio1>; - interrupts = <11 GPIO_ACTIVE_LOW>; + interrupts = <11 IRQ_TYPE_EDGE_RISING>; }; };
Signature · 1 line
2.11.0
RFC PATCH 5/5 ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
Quoted 8 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the vf610-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.
Quoted 6 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,can somebody with the hardware or it's documentation please check which flag is the right one?
@Stefan, can you help to confirm?
Shawn
Quoted 23 lines
Best regards
Uwearch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/vf-colibri-eval-v3.dtsi +1
-1@@ -117,7 +117,7 @@ clocks = <&clk16m>; spi-max-frequency = <10000000>; interrupt-parent = <&gpio1>; - interrupts = <11 GPIO_ACTIVE_LOW>; + interrupts = <11 IRQ_TYPE_EDGE_RISING>; }; };Signature · 1 line
2.11.0
RFC PATCH 5/5 ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
Quoted 9 lines · Shawn Guo
Quoted 8 lines · Uwe Kleine-K?nig
According to the binding documentation and the source code the vf610-gpio controller takes IRQ_TYPE_* as its flags values, not GPIO_ACTIVE_*.
This patch uses the right variable type which yields the same result when compiled. Note that this might be wrong and actually
IRQ_TYPE_LEVEL_LOWis intended by the dt author.
Quoted 9 lines
Quoted 6 lines
Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,can somebody with the hardware or it's documentation please check which flag is the right one?
@Stefan, can you help to confirm?
Thanks for spotting! According to the data sheet it is a low active signal, so I guess IRQ_TYPE_LEVEL_LOW is correct. But the driver actually explicitly requests IRQF_TRIGGER_FALLING, that has been the case since its inception. IMHO LEVEL_LOW should be more rigid since it helps for missed interrupt edges...
--
Stefan
Quoted 23 lines
Quoted 23 lines
Best regards
Uwearch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/vf-colibri-eval-v3.dtsi +1
-2@@ -117,7 +117,7 @@ clocks = <&clk16m>; spi-max-frequency = <10000000>; interrupt-parent = <&gpio1>; - interrupts = <11 GPIO_ACTIVE_LOW>; + interrupts = <11 IRQ_TYPE_EDGE_RISING>; }; }; --2.11.0
PATCH 1/5 dts: gpio_atmel: adapt binding doc to reality
In reply to Uwe Kleine-KönigQuoted 1 line
+- interrupt-controller: Marks the device node as a GPIO controller.
Interrupt controller, not GPIO controller.
Documentation/devicetree/bindings/gpio/gpio_atmel.txt Required properties: · line 17
Quoted 6 lines
+- #interrupt-cells: Should be two. The first cell is the pin number and the
Documentation/devicetree/bindings/gpio/gpio_atmel.txt +5
-0+ 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
PATCH v2 1/5 dts: gpio_atmel: adapt binding doc to reality
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.
---
Quoted 4 lines · Andrew Lunn
Quoted 1 line
+- interrupt-controller: Marks the device node as a GPIO controller.
Interrupt controller, not GPIO controller.
Quoted 8 lines
Review
Quoted 6 lines
+- #interrupt-cells: Should be two. The first cell is the pin number and the
(quoted diff) +5
-0+ 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(-)
Documentation/devicetree/bindings/gpio/gpio_atmel.txt +8 -2
@@ -5,9 +5,13 @@ 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 an interrupt controller. +- #interrupt-cells: Should be two. The first cell is the pin number and the + second cell is used to specify irq type flags, see the two cell description + in interrupt-controller/interrupts.txt for details. optional properties: - #gpio-lines: Number of gpio if absent 32.
@@ -21,5 +25,7 @@ Example: #gpio-cells = <2>; gpio-controller; #gpio-lines = <19>; + interrupt-controller; + #interrupt-cells = <2>; };
Signature · 1 line
2.11.0
Alexandre Belloni
AppliedPATCH v2 1/5 dts: gpio_atmel: adapt binding doc to reality
Quoted 20 lines · Uwe Kleine-K?nig
The second cell in a gpio reference is used to pass
GPIO_ACTIVE_LOWorGPIO_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 <[email protected]>---
Quoted 4 lines · Andrew Lunn
Quoted 1 line
+- interrupt-controller: Marks the device node as a GPIO controller.
Interrupt controller, not GPIO controller.
Quoted 8 lines
Review
Quoted 6 lines
+- #interrupt-cells: Should be two. The first cell is the pin number and the
(quoted diff) +5
-0+ 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?
Quoted 8 lines
ack for both and changed in this v2.
Thanks
UweDocumentation/devicetree/bindings/gpio/gpio_atmel.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com