linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants
@ 2018-04-20 15:45 Sebastian Reichel
  2018-04-20 17:04 ` Ezequiel Garcia
  2018-05-02 13:22 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Reichel @ 2018-04-20 15:45 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Sascha Hauer, Fabio Estevam, linux-kernel, devicetree, kernel,
	Sebastian Reichel

Replace magic numbers with IRQ_TYPE_* constants to improve
DT readability.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 arch/arm/boot/dts/imx53-ppd.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts
index d5628af2e301..d02d07470ad3 100644
--- a/arch/arm/boot/dts/imx53-ppd.dts
+++ b/arch/arm/boot/dts/imx53-ppd.dts
@@ -300,7 +300,7 @@
 		compatible = "dlg,da9053-aa";
 		reg = <0>;
 		interrupt-parent = <&gpio3>;
-		interrupts = <12 0x8>;
+		interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
 		spi-max-frequency = <1000000>;
 		dlg,tsi-as-adc;
 		tsiref-supply = <&reg_tsiref>;
@@ -473,7 +473,7 @@
 				compatible = "fsl,mma8453";
 				reg = <0x1c>;
 				interrupt-parent = <&gpio1>;
-				interrupts = <6 0>;
+				interrupts = <6 IRQ_TYPE_NONE>;
 				interrupt-names = "INT1";
 			};
 
@@ -539,7 +539,7 @@
 		reset-gpio = <&gpio5 19 GPIO_ACTIVE_HIGH>;
 		reg = <0x4b>;
 		interrupt-parent = <&gpio5>;
-		interrupts = <4 0x8>;
+		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
 	};
 };
 
-- 
2.17.0

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

* Re: [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants
  2018-04-20 15:45 [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants Sebastian Reichel
@ 2018-04-20 17:04 ` Ezequiel Garcia
  2018-05-02 13:22 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Ezequiel Garcia @ 2018-04-20 17:04 UTC (permalink / raw)
  To: Sebastian Reichel, Shawn Guo
  Cc: Sascha Hauer, Fabio Estevam, linux-kernel, devicetree, kernel

On Fri, 2018-04-20 at 17:45 +0200, Sebastian Reichel wrote:
> Replace magic numbers with IRQ_TYPE_* constants to improve
> DT readability.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53-ppd.dts | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts
> index d5628af2e301..d02d07470ad3 100644
> --- a/arch/arm/boot/dts/imx53-ppd.dts
> +++ b/arch/arm/boot/dts/imx53-ppd.dts
> @@ -300,7 +300,7 @@
>  		compatible = "dlg,da9053-aa";
>  		reg = <0>;
>  		interrupt-parent = <&gpio3>;
> -		interrupts = <12 0x8>;
> +		interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
>  		spi-max-frequency = <1000000>;
>  		dlg,tsi-as-adc;
>  		tsiref-supply = <&reg_tsiref>;
> @@ -473,7 +473,7 @@
>  				compatible = "fsl,mma8453";
>  				reg = <0x1c>;
>  				interrupt-parent = <&gpio1>;
> -				interrupts = <6 0>;
> +				interrupts = <6 IRQ_TYPE_NONE>;
>  				interrupt-names = "INT1";
>  			};
>  
> @@ -539,7 +539,7 @@
>  		reset-gpio = <&gpio5 19 GPIO_ACTIVE_HIGH>;
>  		reg = <0x4b>;
>  		interrupt-parent = <&gpio5>;
> -		interrupts = <4 0x8>;
> +		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
>  	};
>  };
>  
> 

Looks good to me:

Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>

And it made me think, how many of these do we have?
Or even worse, how many are using the wrong specifiers?

$ git grep interrupts -- arch/arm/boot/dts  | grep -v IRQ_TYPE | grep GPIO
arch/arm/boot/dts/am335x-baltos-ir3220.dts:		interrupts = <20 GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/am335x-baltos-ir5221.dts:		interrupts = <20 GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/am335x-baltos.dtsi:		interrupts = <28 GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/am335x-boneblue.dts:		interrupts = <21 GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/at91-sama5d2_xplained.dts:						interrupts = <PIN_PB13
GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/imx53-qsb.dts:		interrupts = <11 0x8>; /* low-level active IRQ at GPIO7_11 */
arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi:		interrupts = <11 0x8>; /* low-level active IRQ at GPIO7_11
*/
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi:		interrupts = <9 0x8>; /* active-low GPIO2_9 */
arch/arm/boot/dts/omap3-pandora-common.dtsi:		interrupts = <30 0>;	/* GPIO_94 */
arch/arm/boot/dts/ste-href-stuib.dtsi:					 * GPIO 67 for interrupts. Pull-up
arch/arm/boot/dts/tegra124-nyan.dtsi:					interrupts = <TEGRA_GPIO(J, 0)
arch/arm/boot/dts/tegra124-venice2.dts:					interrupts = <TEGRA_GPIO(J, 0)
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi:		interrupts = <11 GPIO_ACTIVE_LOW>;

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

* Re: [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants
  2018-04-20 15:45 [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants Sebastian Reichel
  2018-04-20 17:04 ` Ezequiel Garcia
@ 2018-05-02 13:22 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2018-05-02 13:22 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sascha Hauer, Fabio Estevam, linux-kernel, devicetree, kernel

On Fri, Apr 20, 2018 at 05:45:53PM +0200, Sebastian Reichel wrote:
> Replace magic numbers with IRQ_TYPE_* constants to improve
> DT readability.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

Applied, thanks.

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

end of thread, other threads:[~2018-05-02 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 15:45 [PATCH] ARM: dts: imx53-ppd: Use IRQ_TYPE_* constants Sebastian Reichel
2018-04-20 17:04 ` Ezequiel Garcia
2018-05-02 13:22 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).