Skip to content

Commit 5c0169d

Browse files
tpetazzoniJason Cooper
authored andcommitted
ARM: mvebu: use input DT defines in Armada 370/XP boards
Instead of harcoding keycodes specifications in the Armada 370/XP boards, use the <dt-bindings/input/input.h> header file and its keycode definitions. Signed-off-by: Thomas Petazzoni <[email protected]> Acked-by: Gregory CLEMENT <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
1 parent 29e74f8 commit 5c0169d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

arch/arm/boot/dts/armada-370-rd.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
/dts-v1/;
15+
#include <dt-bindings/input/input.h>
1516
#include <dt-bindings/gpio/gpio.h>
1617
#include "armada-370.dtsi"
1718

@@ -101,7 +102,7 @@
101102
#size-cells = <0>;
102103
button@1 {
103104
label = "Software Button";
104-
linux,code = <116>;
105+
linux,code = <KEY_POWER>;
105106
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
106107
};
107108
};

arch/arm/boot/dts/armada-xp-axpwifiap.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
/dts-v1/;
1919
#include <dt-bindings/gpio/gpio.h>
20+
#include <dt-bindings/input/input.h>
2021
#include "armada-xp-mv78230.dtsi"
2122

2223
/ {
@@ -158,7 +159,7 @@
158159

159160
button@1 {
160161
label = "Factory Reset Button";
161-
linux,code = <141>; /* KEY_SETUP */
162+
linux,code = <KEY_SETUP>;
162163
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
163164
};
164165
};

arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
/dts-v1/;
1414
#include <dt-bindings/gpio/gpio.h>
15+
#include <dt-bindings/input/input.h>
1516
#include "armada-xp-mv78260.dtsi"
1617

1718
/ {
@@ -115,7 +116,7 @@
115116

116117
button@1 {
117118
label = "Init Button";
118-
linux,code = <116>;
119+
linux,code = <KEY_POWER>;
119120
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
120121
};
121122
};

0 commit comments

Comments
 (0)