ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 11 Feb 2014 17:07:12 +0000 (18:07 +0100)
committerJason Cooper <jason@lakedaemon.net>
Tue, 11 Feb 2014 19:35:30 +0000 (19:35 +0000)
Instead of harcoding 0 and 1 for the gpio specifications in the Armada
370/XP boards, use the <dt-bindings/gpio/gpio.h> header file and its
GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW definitions.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/armada-370-mirabox.dts
arch/arm/boot/dts/armada-370-rd.dts
arch/arm/boot/dts/armada-xp-axpwifiap.dts
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts

index 944e8785b30833ea34ace20884c6844a7d3cfe15..2354fe023ee01ee6f9df5e1b0f23e6e9498acf86 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "armada-370.dtsi"
 
 / {
 
                                green_pwr_led {
                                        label = "mirabox:green:pwr";
-                                       gpios = <&gpio1 31 1>;
+                                       gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
                                        default-state = "keep";
                                };
 
                                blue_stat_led {
                                        label = "mirabox:blue:stat";
-                                       gpios = <&gpio2 0 1>;
+                                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
                                        default-state = "off";
                                };
 
                                green_stat_led {
                                        label = "mirabox:green:stat";
-                                       gpios = <&gpio2 1 1>;
+                                       gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
                                        default-state = "off";
                                };
                        };
index abbb807459d26d6708ed01822702f43d79d362e5..c28865d2d7da914fa3535eb0f94c9c7b276896f2 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "armada-370.dtsi"
 
 / {
                                button@1 {
                                        label = "Software Button";
                                        linux,code = <116>;
-                                       gpios = <&gpio0 6 1>;
+                                       gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
                                };
                        };
 
index c5fe57269f5aca5c28f61de250dd5663298ec27e..db1ef585606325420bd42e4096f2215ecd37cc91 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "armada-xp-mv78230.dtsi"
 
 / {
                button@1 {
                        label = "Factory Reset Button";
                        linux,code = <141>; /* KEY_SETUP */
-                       gpios = <&gpio1 1 1>;
+                       gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
                };
        };
 };
index 99bcf76e6953d3e0af3e72fe6372cdecdfbecb1f..944acfb0827c47aad6592603523f7ad93b6cb66b 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "armada-xp-mv78260.dtsi"
 
 / {
 
                                red_led {
                                        label = "red_led";
-                                       gpios = <&gpio1 17 1>;
+                                       gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
                                        default-state = "off";
                                };
 
                                yellow_led {
                                        label = "yellow_led";
-                                       gpios = <&gpio1 19 1>;
+                                       gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
                                        default-state = "off";
                                };
 
                                green_led {
                                        label = "green_led";
-                                       gpios = <&gpio1 21 1>;
+                                       gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
                                        default-state = "keep";
                                };
                        };
                                button@1 {
                                        label = "Init Button";
                                        linux,code = <116>;
-                                       gpios = <&gpio1 28 0>;
+                                       gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
                                };
                        };