All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality
@ 2017-05-26 18:06 ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Nicolas Ferre,
	Alexandre Belloni, Jean-Christophe Plagniol-Villard

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-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
---
 Documentation/devicetree/bindings/gpio/gpio_atmel.txt | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

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>;
 	};
 
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality
@ 2017-05-26 18:06 ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

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>;
 	};
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06 ` Uwe Kleine-König
@ 2017-05-26 18:06     ` Uwe Kleine-König
  -1 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Benoît Cousson,
	Tony Lindgren, linux-omap-u79uwXL29TY76Z2rM5mHXA

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.

Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
---
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(-)

diff --git a/arch/arm/boot/dts/am335x-baltos-ir3220.dts b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
index 19f53b8569e1..7eb975ba044d 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
@@ -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>;
 	};
diff --git a/arch/arm/boot/dts/am335x-baltos-ir5221.dts b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
index 2b9d7f4db23f..f24ae2836e1f 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
@@ -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>;
 	};
diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi
index d42b98f15e8b..e3234d462741 100644
--- a/arch/arm/boot/dts/am335x-baltos.dtsi
+++ b/arch/arm/boot/dts/am335x-baltos.dtsi
@@ -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>;
 	};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
@ 2017-05-26 18:06     ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
---
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(-)

diff --git a/arch/arm/boot/dts/am335x-baltos-ir3220.dts b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
index 19f53b8569e1..7eb975ba044d 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
@@ -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>;
 	};
diff --git a/arch/arm/boot/dts/am335x-baltos-ir5221.dts b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
index 2b9d7f4db23f..f24ae2836e1f 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
@@ -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>;
 	};
diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi b/arch/arm/boot/dts/am335x-baltos.dtsi
index d42b98f15e8b..e3234d462741 100644
--- a/arch/arm/boot/dts/am335x-baltos.dtsi
+++ b/arch/arm/boot/dts/am335x-baltos.dtsi
@@ -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>;
 	};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06 ` Uwe Kleine-König
@ 2017-05-26 18:06     ` Uwe Kleine-König
  -1 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Nicolas Ferre,
	Alexandre Belloni, Jean-Christophe Plagniol-Villard

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_LOW is intended by the dt author.

Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
---
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(-)

diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
index b5a5a91bc2ef..b813fdfa2842 100644
--- a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
@@ -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>;
 				};
 			};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
@ 2017-05-26 18:06     ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

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_LOW is intended by the dt author.

Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
---
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(-)

diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
index b5a5a91bc2ef..b813fdfa2842 100644
--- a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
@@ -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>;
 				};
 			};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 4/5] ARM: dts: tegra: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06 ` Uwe Kleine-König
@ 2017-05-26 18:06     ` Uwe Kleine-König
  -1 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Stephen Warren,
	Thierry Reding, Alexandre Courbot,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

According 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.

Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
---
 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(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 1444fbd543e7..bc2445bf582d 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index 53994f9fbbcc..8d4f1ca85a61 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 6e59cec0962b..c595631b0a0c 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index f6c7c3e958ac..aaaf73c0412e 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -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>;
 		};
 	};
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 0350002849d5..8917589a78e8 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
index a8c0318743b6..07c2888d3e48 100644
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -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@1 {
 			compatible = "spidev";
 			reg = <1>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 4/5] ARM: dts: tegra: use IRQ_TYPE_* to specify irq flags
@ 2017-05-26 18:06     ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

According 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.

Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
---
 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(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 1444fbd543e7..bc2445bf582d 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index 53994f9fbbcc..8d4f1ca85a61 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 6e59cec0962b..c595631b0a0c 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index f6c7c3e958ac..aaaf73c0412e 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -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>;
 		};
 	};
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 0350002849d5..8917589a78e8 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -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>;
 		};
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
index a8c0318743b6..07c2888d3e48 100644
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -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>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06 ` Uwe Kleine-König
@ 2017-05-26 18:06     ` Uwe Kleine-König
  -1 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Shawn Guo

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_LOW is intended by the dt author.

Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
---
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(-)

diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 091b738041a0..3e0c84d79c43 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
@ 2017-05-26 18:06     ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

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_LOW is intended by the dt author.

Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
---
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(-)

diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 091b738041a0..3e0c84d79c43 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -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

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality
  2017-05-26 18:06 ` Uwe Kleine-König
@ 2017-05-26 18:52     ` Andrew Lunn
  -1 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2017-05-26 18:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Frank Rowand, Arnd Bergmann, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Alexandre Belloni,
	Jean-Christophe Plagniol-Villard,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

> +- 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality
@ 2017-05-26 18:52     ` Andrew Lunn
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2017-05-26 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

> +- 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/5] dts: gpio_atmel: adapt binding doc to reality
  2017-05-26 18:52     ` Andrew Lunn
@ 2017-05-26 19:07       ` Uwe Kleine-König
  -1 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 19:07 UTC (permalink / raw)
  To: Andrew Lunn, Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: Marek Vasut, devicetree, Jean-Christophe Plagniol-Villard,
	Alexandre Belloni, linux-arm-kernel

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(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
--- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
@@ -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>;
 	};
 
-- 
2.11.0

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/5] dts: gpio_atmel: adapt binding doc to reality
@ 2017-05-26 19:07       ` Uwe Kleine-König
  0 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2017-05-26 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
--- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
@@ -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>;
 	};
 
-- 
2.11.0

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06     ` Uwe Kleine-König
@ 2017-05-26 19:17       ` Marek Vasut
  -1 siblings, 0 replies; 32+ messages in thread
From: Marek Vasut @ 2017-05-26 19:17 UTC (permalink / raw)
  To: Uwe Kleine-König, Rob Herring, Frank Rowand, Arnd Bergmann
  Cc: devicetree, Jean-Christophe Plagniol-Villard, Alexandre Belloni,
	linux-arm-kernel

On 05/26/2017 08:06 PM, Uwe Kleine-König wrote:
> 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_LOW is intended by the dt author.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> 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:

Acked-by: Marek Vasut <marex@denx.de>

> Best regards
> Uwe
> 
>  arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> index b5a5a91bc2ef..b813fdfa2842 100644
> --- a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> @@ -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>;
>  				};
>  			};
> 


-- 
Best regards,
Marek Vasut

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
@ 2017-05-26 19:17       ` Marek Vasut
  0 siblings, 0 replies; 32+ messages in thread
From: Marek Vasut @ 2017-05-26 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/26/2017 08:06 PM, Uwe Kleine-K?nig wrote:
> 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_LOW is intended by the dt author.
> 
> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> ---
> 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:

Acked-by: Marek Vasut <marex@denx.de>

> Best regards
> Uwe
> 
>  arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> index b5a5a91bc2ef..b813fdfa2842 100644
> --- a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
> @@ -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>;
>  				};
>  			};
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
  2017-05-26 19:17       ` Marek Vasut
@ 2017-05-31  9:52           ` Alexandre Belloni
  -1 siblings, 0 replies; 32+ messages in thread
From: Alexandre Belloni @ 2017-05-31  9:52 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Uwe Kleine-König, Rob Herring, Frank Rowand, Arnd Bergmann,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Nicolas Ferre,
	Jean-Christophe Plagniol-Villard

On 26/05/2017 at 21:17:37 +0200, Marek Vasut wrote:
> On 05/26/2017 08:06 PM, Uwe Kleine-König wrote:
> > 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_LOW is intended by the dt author.
> > 
> > Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
> > ---
> > 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:
> 
> Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
> 
> > Best regards
> > Uwe
> > 
> >  arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 3/5] ARM: dts: at91-sama5d4: use IRQ_TYPE_* to specify irq flags
@ 2017-05-31  9:52           ` Alexandre Belloni
  0 siblings, 0 replies; 32+ messages in thread
From: Alexandre Belloni @ 2017-05-31  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 26/05/2017 at 21:17:37 +0200, Marek Vasut wrote:
> On 05/26/2017 08:06 PM, Uwe Kleine-K?nig wrote:
> > 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_LOW is intended by the dt author.
> > 
> > Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> > ---
> > 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:
> 
> Acked-by: Marek Vasut <marex@denx.de>
> 
> > Best regards
> > Uwe
> > 
> >  arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/5] dts: gpio_atmel: adapt binding doc to reality
  2017-05-26 19:07       ` Uwe Kleine-König
@ 2017-05-31  9:52           ` Alexandre Belloni
  -1 siblings, 0 replies; 32+ messages in thread
From: Alexandre Belloni @ 2017-05-31  9:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Andrew Lunn, Rob Herring, Frank Rowand, Arnd Bergmann,
	Marek Vasut, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Jean-Christophe Plagniol-Villard,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.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.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/5] dts: gpio_atmel: adapt binding doc to reality
@ 2017-05-31  9:52           ` Alexandre Belloni
  0 siblings, 0 replies; 32+ messages in thread
From: Alexandre Belloni @ 2017-05-31  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

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.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06     ` Uwe Kleine-König
@ 2017-05-31 17:19       ` Tony Lindgren
  -1 siblings, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2017-05-31 17:19 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Marek Vasut, devicetree, Arnd Bergmann, Rob Herring,
	Benoît Cousson, linux-omap, Frank Rowand, linux-arm-kernel

* Uwe Kleine-König <uwe@kleine-koenig.org> [170526 11:09]:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
@ 2017-05-31 17:19       ` Tony Lindgren
  0 siblings, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2017-05-31 17:19 UTC (permalink / raw)
  To: linux-arm-kernel

* Uwe Kleine-K?nig <uwe@kleine-koenig.org> [170526 11:09]:
> 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.
> 
> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> ---
> 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
  2017-05-31 17:19       ` Tony Lindgren
@ 2017-05-31 17:22         ` Yegor Yefremov
  -1 siblings, 0 replies; 32+ messages in thread
From: Yegor Yefremov @ 2017-05-31 17:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Marek Vasut, devicetree, Uwe Kleine-König, Arnd Bergmann,
	Rob Herring, Benoît Cousson, linux-omap, Frank Rowand,
	linux-arm-kernel

Hi Uwe, Tony,

On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Uwe Kleine-König <uwe@kleine-koenig.org> [170526 11:09]:
>> 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.
>>
>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
>> ---
>> 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
@ 2017-05-31 17:22         ` Yegor Yefremov
  0 siblings, 0 replies; 32+ messages in thread
From: Yegor Yefremov @ 2017-05-31 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Uwe, Tony,

On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Uwe Kleine-K?nig <uwe@kleine-koenig.org> [170526 11:09]:
>> 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.
>>
>> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
>> ---
>> 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
  2017-05-26 18:06     ` Uwe Kleine-König
@ 2017-06-04  3:49         ` Shawn Guo
  -1 siblings, 0 replies; 32+ messages in thread
From: Shawn Guo @ 2017-06-04  3:49 UTC (permalink / raw)
  To: Uwe Kleine-König, Stefan Agner
  Cc: Rob Herring, Frank Rowand, Arnd Bergmann,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Fri, May 26, 2017 at 08:06:09PM +0200, Uwe Kleine-König wrote:
> 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_LOW is intended by the dt author.
> 
> Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
> ---
> 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

> 
> Best regards
> Uwe
> 
>  arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> index 091b738041a0..3e0c84d79c43 100644
> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> @@ -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
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
@ 2017-06-04  3:49         ` Shawn Guo
  0 siblings, 0 replies; 32+ messages in thread
From: Shawn Guo @ 2017-06-04  3:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 26, 2017 at 08:06:09PM +0200, Uwe Kleine-K?nig wrote:
> 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_LOW is intended by the dt author.
> 
> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> ---
> 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

> 
> Best regards
> Uwe
> 
>  arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> index 091b738041a0..3e0c84d79c43 100644
> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> @@ -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
> 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
  2017-06-04  3:49         ` Shawn Guo
@ 2017-06-05  2:17           ` Stefan Agner
  -1 siblings, 0 replies; 32+ messages in thread
From: Stefan Agner @ 2017-06-05  2:17 UTC (permalink / raw)
  To: Shawn Guo, Uwe Kleine-König
  Cc: Rob Herring, Frank Rowand, Arnd Bergmann,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marek Vasut,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 2017-06-03 20:49, Shawn Guo wrote:
> On Fri, May 26, 2017 at 08:06:09PM +0200, Uwe Kleine-König wrote:
>> 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_LOW is intended by the dt author.
>>
>> Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
>> ---
>> 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

>>
>> Best regards
>> Uwe
>>
>>  arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> index 091b738041a0..3e0c84d79c43 100644
>> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> @@ -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
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: use IRQ_TYPE_* to specify irq flags
@ 2017-06-05  2:17           ` Stefan Agner
  0 siblings, 0 replies; 32+ messages in thread
From: Stefan Agner @ 2017-06-05  2:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 2017-06-03 20:49, Shawn Guo wrote:
> On Fri, May 26, 2017 at 08:06:09PM +0200, Uwe Kleine-K?nig wrote:
>> 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_LOW is intended by the dt author.
>>
>> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
>> ---
>> 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

>>
>> Best regards
>> Uwe
>>
>>  arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> index 091b738041a0..3e0c84d79c43 100644
>> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
>> @@ -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
>>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
  2017-05-31 17:22         ` Yegor Yefremov
@ 2017-06-06 14:33             ` Yegor Yefremov
  -1 siblings, 0 replies; 32+ messages in thread
From: Yegor Yefremov @ 2017-06-06 14:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Uwe Kleine-König, Rob Herring, Frank Rowand, Arnd Bergmann,
	linux-arm-kernel, Marek Vasut, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Benoît Cousson, linux-omap-u79uwXL29TY76Z2rM5mHXA

On Wed, May 31, 2017 at 7:22 PM, Yegor Yefremov
<yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> Hi Uwe, Tony,
>
> On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> wrote:
>> * Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org> [170526 11:09]:
>>> 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.
>>>
>>> Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
>>> ---
>>> 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.

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

diff --git a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
index 1b215c4..944b095 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
@@ -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>;
        };
diff --git a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
index 832ead8..ae5692b 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
@@ -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>;
        };
diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi
b/arch/arm/boot/dts/am335x-baltos.dtsi
index e3234d4..863942d 100644
--- a/arch/arm/boot/dts/am335x-baltos.dtsi
+++ b/arch/arm/boot/dts/am335x-baltos.dtsi
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
@ 2017-06-06 14:33             ` Yegor Yefremov
  0 siblings, 0 replies; 32+ messages in thread
From: Yegor Yefremov @ 2017-06-06 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 31, 2017 at 7:22 PM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> Hi Uwe, Tony,
>
> On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony@atomide.com> wrote:
>> * Uwe Kleine-K?nig <uwe@kleine-koenig.org> [170526 11:09]:
>>> 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.
>>>
>>> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
>>> ---
>>> 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.

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

diff --git a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
index 1b215c4..944b095 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir3220.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir3220.dts
@@ -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>;
        };
diff --git a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
index 832ead8..ae5692b 100644
--- a/arch/arm/boot/dts/am335x-baltos-ir5221.dts
+++ b/arch/arm/boot/dts/am335x-baltos-ir5221.dts
@@ -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>;
        };
diff --git a/arch/arm/boot/dts/am335x-baltos.dtsi
b/arch/arm/boot/dts/am335x-baltos.dtsi
index e3234d4..863942d 100644
--- a/arch/arm/boot/dts/am335x-baltos.dtsi
+++ b/arch/arm/boot/dts/am335x-baltos.dtsi
@@ -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

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
  2017-06-06 14:33             ` Yegor Yefremov
@ 2017-06-12  7:32                 ` Tony Lindgren
  -1 siblings, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2017-06-12  7:32 UTC (permalink / raw)
  To: Yegor Yefremov
  Cc: Uwe Kleine-König, Rob Herring, Frank Rowand, Arnd Bergmann,
	linux-arm-kernel, Marek Vasut, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Benoît Cousson, linux-omap-u79uwXL29TY76Z2rM5mHXA

* Yegor Yefremov <yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> [170606 07:37]:
> On Wed, May 31, 2017 at 7:22 PM, Yegor Yefremov
> <yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> > Hi Uwe, Tony,
> >
> > On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> wrote:
> >> * Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org> [170526 11:09]:
> >>> 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.
> >>>
> >>> Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
> >>> ---
> >>> 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.
> 
> 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

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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags
@ 2017-06-12  7:32                 ` Tony Lindgren
  0 siblings, 0 replies; 32+ messages in thread
From: Tony Lindgren @ 2017-06-12  7:32 UTC (permalink / raw)
  To: linux-arm-kernel

* Yegor Yefremov <yegorslists@googlemail.com> [170606 07:37]:
> On Wed, May 31, 2017 at 7:22 PM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
> > Hi Uwe, Tony,
> >
> > On Wed, May 31, 2017 at 7:19 PM, Tony Lindgren <tony@atomide.com> wrote:
> >> * Uwe Kleine-K?nig <uwe@kleine-koenig.org> [170526 11:09]:
> >>> 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.
> >>>
> >>> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> >>> ---
> >>> 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.
> 
> 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

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-06-12  7:32 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 18:06 [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality Uwe Kleine-König
2017-05-26 18:06 ` Uwe Kleine-König
     [not found] ` <20170526180609.2699-1-uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
2017-05-26 18:06   ` [PATCH RFC 2/5] ARM: dts: am335x-baltos: use IRQ_TYPE_* to specify irq flags Uwe Kleine-König
2017-05-26 18:06     ` Uwe Kleine-König
2017-05-31 17:19     ` Tony Lindgren
2017-05-31 17:19       ` Tony Lindgren
2017-05-31 17:22       ` Yegor Yefremov
2017-05-31 17:22         ` Yegor Yefremov
     [not found]         ` <CAGm1_ktJp+3t9ExuFJhKTmbM63yt-82PGP26KkEHGqK-tnfWRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-06 14:33           ` Yegor Yefremov
2017-06-06 14:33             ` Yegor Yefremov
     [not found]             ` <CAGm1_kuKxVOetzMLdnVO+xQ7egX+paqOHLS+ckz6nFwKD5QBuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-12  7:32               ` Tony Lindgren
2017-06-12  7:32                 ` Tony Lindgren
2017-05-26 18:06   ` [PATCH RFC 3/5] ARM: dts: at91-sama5d4: " Uwe Kleine-König
2017-05-26 18:06     ` Uwe Kleine-König
2017-05-26 19:17     ` Marek Vasut
2017-05-26 19:17       ` Marek Vasut
     [not found]       ` <8bbb5802-518b-6ae1-6ea2-642b1f0b3d2e-ynQEQJNshbs@public.gmane.org>
2017-05-31  9:52         ` Alexandre Belloni
2017-05-31  9:52           ` Alexandre Belloni
2017-05-26 18:06   ` [PATCH RFC 4/5] ARM: dts: tegra: " Uwe Kleine-König
2017-05-26 18:06     ` Uwe Kleine-König
2017-05-26 18:06   ` [PATCH RFC 5/5] ARM: dts: vf-colibri-eval: " Uwe Kleine-König
2017-05-26 18:06     ` Uwe Kleine-König
     [not found]     ` <20170526180609.2699-5-uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
2017-06-04  3:49       ` Shawn Guo
2017-06-04  3:49         ` Shawn Guo
2017-06-05  2:17         ` Stefan Agner
2017-06-05  2:17           ` Stefan Agner
2017-05-26 18:52   ` [PATCH 1/5] dts: gpio_atmel: adapt binding doc to reality Andrew Lunn
2017-05-26 18:52     ` Andrew Lunn
2017-05-26 19:07     ` [PATCH v2 " Uwe Kleine-König
2017-05-26 19:07       ` Uwe Kleine-König
     [not found]       ` <20170526190703.t5fab33peh2cmobm-T6qyLwKrzP+Pq0V0m3QNwQq/OYV65a7L4Y2cMoPwMik@public.gmane.org>
2017-05-31  9:52         ` Alexandre Belloni
2017-05-31  9:52           ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.