Skip to content

Commit

Permalink
ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Petazzoni authored and Jason Cooper committed Feb 11, 2014
1 parent 934b524 commit 29e74f8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
7 changes: 4 additions & 3 deletions arch/arm/boot/dts/armada-370-mirabox.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "armada-370.dtsi"

/ {
Expand Down Expand Up @@ -73,19 +74,19 @@

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";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/armada-370-rd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "armada-370.dtsi"

/ {
Expand Down Expand Up @@ -101,7 +102,7 @@
button@1 {
label = "Software Button";
linux,code = <116>;
gpios = <&gpio0 6 1>;
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
};

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/armada-xp-axpwifiap.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "armada-xp-mv78230.dtsi"

/ {
Expand Down Expand Up @@ -158,7 +159,7 @@
button@1 {
label = "Factory Reset Button";
linux,code = <141>; /* KEY_SETUP */
gpios = <&gpio1 1 1>;
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
};
};
9 changes: 5 additions & 4 deletions arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "armada-xp-mv78260.dtsi"

/ {
Expand Down Expand Up @@ -90,19 +91,19 @@

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";
};
};
Expand All @@ -115,7 +116,7 @@
button@1 {
label = "Init Button";
linux,code = <116>;
gpios = <&gpio1 28 0>;
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
};
};

Expand Down

0 comments on commit 29e74f8

Please sign in to comment.