Browse Source

treewide: dts: use keycode defines from input dt-binding

All compiled device tree files not mentioned are binary identical to the
former ones.

Fix the obvious decimal/hex confusion for the power key of ramips/M2M.dts.

Due to the include of the input binding header, the BTN_* node names in:

  - ramips/GL-MT300A.dts
  - ramips/GL-MT300N.dts
  - ramips/GL-MT750.dts
  - ramips/Timecloud.dts

will be changed by the compiler to the numerical equivalent.

Move the binding include of lantiq boards to the file where they are
used the first time to hint the user where the values do come from.

Signed-off-by: Mathias Kresin <[email protected]>
Mathias Kresin 9 years ago
parent
commit
2b55c83e68
100 changed files with 307 additions and 121 deletions
  1. 1 1
      target/linux/brcm63xx/dts/homehub2a.dts
  2. 2 0
      target/linux/lantiq/dts/ARV4510PW.dts
  3. 2 0
      target/linux/lantiq/dts/ARV4518PWR01.dtsi
  4. 2 0
      target/linux/lantiq/dts/ARV4519PW.dts
  5. 2 0
      target/linux/lantiq/dts/ARV4520PW.dts
  6. 2 0
      target/linux/lantiq/dts/ARV4525PW.dts
  7. 2 0
      target/linux/lantiq/dts/ARV452CQW.dts
  8. 2 0
      target/linux/lantiq/dts/ARV7506PW11.dts
  9. 2 0
      target/linux/lantiq/dts/ARV7510PW22.dts
  10. 2 0
      target/linux/lantiq/dts/ARV7518PW.dts
  11. 2 0
      target/linux/lantiq/dts/ARV7519PW.dts
  12. 2 0
      target/linux/lantiq/dts/ARV7519RW22.dts
  13. 2 0
      target/linux/lantiq/dts/ARV7525PW.dts
  14. 2 0
      target/linux/lantiq/dts/ARV752DPW.dts
  15. 2 0
      target/linux/lantiq/dts/ARV752DPW22.dts
  16. 2 0
      target/linux/lantiq/dts/ARV8539PW22.dts
  17. 2 0
      target/linux/lantiq/dts/BTHOMEHUBV2B.dts
  18. 2 0
      target/linux/lantiq/dts/BTHOMEHUBV3A.dts
  19. 2 0
      target/linux/lantiq/dts/BTHOMEHUBV5A.dts
  20. 2 0
      target/linux/lantiq/dts/DGN1000B.dts
  21. 2 0
      target/linux/lantiq/dts/DGN3500.dtsi
  22. 2 0
      target/linux/lantiq/dts/EASY80920.dtsi
  23. 2 0
      target/linux/lantiq/dts/FRITZ3370.dts
  24. 2 0
      target/linux/lantiq/dts/FRITZ7320.dts
  25. 2 0
      target/linux/lantiq/dts/FRITZ7360SL.dts
  26. 2 0
      target/linux/lantiq/dts/GIGASX76X.dts
  27. 2 0
      target/linux/lantiq/dts/H201L.dts
  28. 2 0
      target/linux/lantiq/dts/P2601HNFX.dts
  29. 2 0
      target/linux/lantiq/dts/P2812HNUFX.dtsi
  30. 2 0
      target/linux/lantiq/dts/TDW89X0.dtsi
  31. 2 0
      target/linux/lantiq/dts/VG3503J.dts
  32. 2 0
      target/linux/lantiq/dts/VGV7510KW22.dtsi
  33. 2 0
      target/linux/lantiq/dts/VGV7519.dtsi
  34. 2 0
      target/linux/lantiq/dts/VR200v.dts
  35. 2 0
      target/linux/lantiq/dts/WBMR.dts
  36. 2 0
      target/linux/lantiq/dts/WBMR300.dts
  37. 0 1
      target/linux/lantiq/dts/amazonse.dtsi
  38. 0 1
      target/linux/lantiq/dts/ar9.dtsi
  39. 0 1
      target/linux/lantiq/dts/danube.dtsi
  40. 0 1
      target/linux/lantiq/dts/vr9.dtsi
  41. 4 2
      target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts
  42. 5 3
      target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts
  43. 4 2
      target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts
  44. 4 2
      target/linux/ramips/dts/3G-6200N.dts
  45. 3 1
      target/linux/ramips/dts/3G-6200NL.dts
  46. 3 1
      target/linux/ramips/dts/3G150B.dts
  47. 4 2
      target/linux/ramips/dts/3G300M.dts
  48. 3 1
      target/linux/ramips/dts/A5-V11.dts
  49. 3 1
      target/linux/ramips/dts/AI-BR100.dts
  50. 3 1
      target/linux/ramips/dts/AIR3GII.dts
  51. 5 3
      target/linux/ramips/dts/ALL0239-3G.dts
  52. 3 1
      target/linux/ramips/dts/ALL0256N-4M.dts
  53. 3 1
      target/linux/ramips/dts/ALL0256N-8M.dts
  54. 4 2
      target/linux/ramips/dts/AR670W.dts
  55. 4 2
      target/linux/ramips/dts/AR725W.dts
  56. 4 2
      target/linux/ramips/dts/ASL26555-16M.dts
  57. 4 2
      target/linux/ramips/dts/ASL26555-8M.dts
  58. 4 2
      target/linux/ramips/dts/ATP-52B.dts
  59. 3 1
      target/linux/ramips/dts/AWAPN2403.dts
  60. 4 2
      target/linux/ramips/dts/AWM002-EVB-4M.dts
  61. 4 2
      target/linux/ramips/dts/AWM002-EVB-8M.dts
  62. 4 2
      target/linux/ramips/dts/AWM003-EVB.dts
  63. 4 2
      target/linux/ramips/dts/ArcherC20i.dts
  64. 3 1
      target/linux/ramips/dts/BC2.dts
  65. 4 2
      target/linux/ramips/dts/BR-6425.dts
  66. 5 3
      target/linux/ramips/dts/BR-6475ND.dts
  67. 3 1
      target/linux/ramips/dts/BROADWAY.dts
  68. 3 1
      target/linux/ramips/dts/CF-WR800N.dts
  69. 4 2
      target/linux/ramips/dts/CS-QR10.dts
  70. 4 2
      target/linux/ramips/dts/CY-SWR1100.dts
  71. 3 1
      target/linux/ramips/dts/D105.dts
  72. 6 4
      target/linux/ramips/dts/DAP-1350.dts
  73. 3 1
      target/linux/ramips/dts/DB-WRT01.dts
  74. 4 2
      target/linux/ramips/dts/DCH-M225.dts
  75. 4 2
      target/linux/ramips/dts/DCS-930.dts
  76. 4 2
      target/linux/ramips/dts/DCS-930L-B1.dts
  77. 4 2
      target/linux/ramips/dts/DIR-300-B1.dts
  78. 4 2
      target/linux/ramips/dts/DIR-300-B7.dts
  79. 4 2
      target/linux/ramips/dts/DIR-320-B1.dts
  80. 4 2
      target/linux/ramips/dts/DIR-600-B1.dts
  81. 4 2
      target/linux/ramips/dts/DIR-600-B2.dts
  82. 4 2
      target/linux/ramips/dts/DIR-610-A1.dts
  83. 4 2
      target/linux/ramips/dts/DIR-615-D.dts
  84. 4 2
      target/linux/ramips/dts/DIR-615-H1.dts
  85. 4 2
      target/linux/ramips/dts/DIR-620-A1.dts
  86. 3 1
      target/linux/ramips/dts/DIR-620-D1.dts
  87. 4 2
      target/linux/ramips/dts/DIR-645.dts
  88. 4 2
      target/linux/ramips/dts/DIR-810L.dts
  89. 4 2
      target/linux/ramips/dts/DIR-860L-B1.dts
  90. 4 2
      target/linux/ramips/dts/DUZUN-DM06.dts
  91. 4 2
      target/linux/ramips/dts/E1700.dts
  92. 4 2
      target/linux/ramips/dts/ESR-9753.dts
  93. 4 2
      target/linux/ramips/dts/EX2700.dts
  94. 4 2
      target/linux/ramips/dts/F5D8235_V1.dts
  95. 5 3
      target/linux/ramips/dts/F7C027.dts
  96. 4 2
      target/linux/ramips/dts/FIREWRT.dts
  97. 5 3
      target/linux/ramips/dts/FONERA20N.dts
  98. 5 3
      target/linux/ramips/dts/GL-MT300A.dts
  99. 5 3
      target/linux/ramips/dts/GL-MT300N.dts
  100. 5 3
      target/linux/ramips/dts/GL-MT750.dts

+ 1 - 1
target/linux/brcm63xx/dts/homehub2a.dts

@@ -43,7 +43,7 @@
 		phone {
 			label = "phone";
 			gpios = <&gpio0 1 1>;
-			linux,code = <169>;
+			linux,code = <KEY_PHONE>;
 		};
 		reset {
 			label = "reset";

+ 2 - 0
target/linux/lantiq/dts/ARV4510PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV4510PW - Wippies, Elisa";
 

+ 2 - 0
target/linux/lantiq/dts/ARV4518PWR01.dtsi

@@ -1,5 +1,7 @@
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	chosen {
 		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";

+ 2 - 0
target/linux/lantiq/dts/ARV4519PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G";
 

+ 2 - 0
target/linux/lantiq/dts/ARV4520PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV4520PW - Easybox 800, WAV-281";
 

+ 2 - 0
target/linux/lantiq/dts/ARV4525PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV4525PW - Speedport W501V Typ A";
 

+ 2 - 0
target/linux/lantiq/dts/ARV452CQW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV452CQW - Arcor 801";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7506PW11.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7506PW11 - Alice/O2 IAD 4421";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7510PW22.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7510PW22 - Astoria Networks";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7518PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7518PW - Astoria Networks";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7519PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7519PW - Astoria Networks";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7519RW22.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7519RW22 - Orange Livebox 2.1";
 

+ 2 - 0
target/linux/lantiq/dts/ARV7525PW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV7525PW - Speedport W303V Typ A";
 

+ 2 - 0
target/linux/lantiq/dts/ARV752DPW.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV752DPW - Arcor 802";
 

+ 2 - 0
target/linux/lantiq/dts/ARV752DPW22.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV752DPW22 - Arcor 803";
 

+ 2 - 0
target/linux/lantiq/dts/ARV8539PW22.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "ARV8539PW22 - Speedport W 504V Typ A";
 

+ 2 - 0
target/linux/lantiq/dts/BTHOMEHUBV2B.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "BTHOMEHUBV2B - BT Home Hub 2B";  /* SoC: Lantiq Danube-S PSB 50712 @ 333MHz V1.3/1.5 */
 

+ 2 - 0
target/linux/lantiq/dts/BTHOMEHUBV3A.dts

@@ -2,6 +2,8 @@
 
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "BTHOMEHUBV3A - BT Home Hub 3A";  /* SoC: Lantiq ar9 @ 333MHz */
 

+ 2 - 0
target/linux/lantiq/dts/BTHOMEHUBV5A.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "BTHOMEHUBV5A - BT Home Hub 5A";
 

+ 2 - 0
target/linux/lantiq/dts/DGN1000B.dts

@@ -2,6 +2,8 @@
 
 #include "amazonse.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "DGN1000B - Netgear DGN1000B";
 

+ 2 - 0
target/linux/lantiq/dts/DGN3500.dtsi

@@ -1,5 +1,7 @@
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	chosen {
 		bootargs = "root= console=ttyLTQ0,115200";

+ 2 - 0
target/linux/lantiq/dts/EASY80920.dtsi

@@ -1,5 +1,7 @@
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	chosen {
 		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";

+ 2 - 0
target/linux/lantiq/dts/FRITZ3370.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "FRITZ3370 - Fritz!Box WLAN 3370";
 

+ 2 - 0
target/linux/lantiq/dts/FRITZ7320.dts

@@ -2,6 +2,8 @@
 
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "FRITZ7320 - 1&1 HomeServer";
 

+ 2 - 0
target/linux/lantiq/dts/FRITZ7360SL.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "FRITZ7360SL - 1&1 HomeServer";
 

+ 2 - 0
target/linux/lantiq/dts/GIGASX76X.dts

@@ -2,6 +2,8 @@
 
 #include "danube.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "GIGASX76X - Gigaset SX761,SX762,SX763";
 

+ 2 - 0
target/linux/lantiq/dts/H201L.dts

@@ -2,6 +2,8 @@
 
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "H201L - ZTE H210L";
 

+ 2 - 0
target/linux/lantiq/dts/P2601HNFX.dts

@@ -2,6 +2,8 @@
 
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "P2601HNFX - ZyXEL P-2601HN-Fx";
 

+ 2 - 0
target/linux/lantiq/dts/P2812HNUFX.dtsi

@@ -1,5 +1,7 @@
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	chosen {
 		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";

+ 2 - 0
target/linux/lantiq/dts/TDW89X0.dtsi

@@ -1,5 +1,7 @@
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	chosen {
 		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";

+ 2 - 0
target/linux/lantiq/dts/VG3503J.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "VG3503J - BT OpenReach VDSL Modem";
 

+ 2 - 0
target/linux/lantiq/dts/VGV7510KW22.dtsi

@@ -1,5 +1,7 @@
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "VGV7510KW22 - o2 Box 6431";
 

+ 2 - 0
target/linux/lantiq/dts/VGV7519.dtsi

@@ -1,5 +1,7 @@
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 
 	model = "VGV7519 - KPN Experiabox V8";

+ 2 - 0
target/linux/lantiq/dts/VR200v.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "VR200v - TP-LINK Archer VR200v";
 

+ 2 - 0
target/linux/lantiq/dts/WBMR.dts

@@ -2,6 +2,8 @@
 
 #include "ar9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "WBMR - Buffalo WBMR-HP-G300H";
 

+ 2 - 0
target/linux/lantiq/dts/WBMR300.dts

@@ -2,6 +2,8 @@
 
 #include "vr9.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "WBMR300 - Buffalo WBMR-300HPD";
 

+ 0 - 1
target/linux/lantiq/dts/amazonse.dtsi

@@ -1,5 +1,4 @@
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 
 / {
 	#address-cells = <1>;

+ 0 - 1
target/linux/lantiq/dts/ar9.dtsi

@@ -1,5 +1,4 @@
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 
 / {
 	#address-cells = <1>;

+ 0 - 1
target/linux/lantiq/dts/danube.dtsi

@@ -1,5 +1,4 @@
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 
 / {
 	#address-cells = <1>;

+ 0 - 1
target/linux/lantiq/dts/vr9.dtsi

@@ -1,5 +1,4 @@
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 
 / {
 	#address-cells = <1>;

+ 4 - 2
target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts

@@ -9,6 +9,8 @@
 /dts-v1/;
 #include "ox820.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "Akitio MyCloud mini";
 
@@ -75,12 +77,12 @@
 		power {
 			label = "power";
 			gpios = <&GPIOA 11 1>;
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 		};
 		reset {
 			label = "reset";
 			gpios = <&GPIOB 6 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 

+ 5 - 3
target/linux/oxnas/files/arch/arm/boot/dts/ox820-kd20.dts

@@ -9,6 +9,8 @@
 /dts-v1/;
 #include "ox820.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "Shuttle KD20";
 
@@ -91,17 +93,17 @@
 		power {
 			label = "power";
 			gpios = <&GPIOA 10 1>;
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 		};
 		reset {
 			label = "reset";
 			gpios = <&GPIOA 11 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 		eject1 {
 			label = "eject1";
 			gpios = <&GPIOA 5 1>;
-			linux,code = <161>;
+			linux,code = <KEY_EJECTCD>;
 		};
 		eject2 {
 			label = "eject2";

+ 4 - 2
target/linux/oxnas/files/arch/arm/boot/dts/ox820-stg212.dts

@@ -10,6 +10,8 @@
 
 #include "ox820.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "MitraStar Technology Corp. STG-212";
 
@@ -57,12 +59,12 @@
 		reset {
 			label = "reset";
 			gpios = <&GPIOB 11 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 		copy {
 			label = "copy";
 			gpios = <&GPIOB 13 1>;
-			linux,code = <0x85>;
+			linux,code = <KEY_COPY>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/3G-6200N.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "3G-6200N", "ralink,rt3050-soc";
 	model = "Edimax 3g-6200n";
@@ -72,13 +74,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		rfkill {
 			label = "wlanswitch";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0xf7>;
+			linux,code = <KEY_RFKILL>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/3G-6200NL.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "3G-6200NL", "ralink,rt3050-soc";
 	model = "Edimax 3g-6200nl";
@@ -67,7 +69,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/3G150B.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "3G150B", "ralink,rt5350-soc";
 	model = "Tenda 3G150B";
@@ -29,7 +31,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/3G300M.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "3G300M", "ralink,rt3052-soc";
 	model = "Tenda 3G300M";
@@ -49,13 +51,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		mode {
 			label = "mode";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/A5-V11.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "A5-V11", "ralink,rt5350-soc";
 	model = "A5-V11";
@@ -29,7 +31,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 

+ 3 - 1
target/linux/ramips/dts/AI-BR100.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AI-BR100", "ralink,mt7620a-soc";
 	model = "Aigale Ai-BR100";
@@ -29,7 +31,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/AIR3GII.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AIR3GII", "ralink,rt5350-soc";
 	model = "AirLive Air3GII";
@@ -29,7 +31,7 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 5 - 3
target/linux/ramips/dts/ALL0239-3G.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ALL0239-3G", "ralink,rt3052-soc";
 	model = "Allnet ALL0239-3G";
@@ -72,19 +74,19 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		connect {
 			label = "connect";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0xda>;
+			linux,code = <KEY_CONNECT>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/ALL0256N-4M.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ALL0256N", "ralink,rt3050-soc";
 	model = "Allnet ALL0256N";
@@ -34,7 +36,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/ALL0256N-8M.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ALL0256N", "ralink,rt3050-soc";
 	model = "Allnet ALL0256N";
@@ -34,7 +36,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/AR670W.dts

@@ -2,6 +2,8 @@
 
 #include "rt2880.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AR670W", "ralink,rt2880-soc";
 	model = "Airlink101 AR670W";
@@ -54,13 +56,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 9 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/AR725W.dts

@@ -2,6 +2,8 @@
 
 #include "rt2880.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AR725W", "ralink,rt2880-soc";
 	model = "Airlink101 AR725W";
@@ -64,13 +66,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 9 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/ASL26555-16M.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ASL26555", "ralink,rt3050-soc";
 	model = "Alpha ASL26555";
@@ -15,13 +17,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 0>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 12 0>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/ASL26555-8M.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ASL26555", "ralink,rt3050-soc";
 	model = "Alpha ASL26555";
@@ -15,13 +17,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 0>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 12 0>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/ATP-52B.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ATP-52B", "ralink,rt3052-soc";
 	model = "Argus ATP-52B";
@@ -59,13 +61,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/AWAPN2403.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AWAPN2403", "ralink,rt3052-soc";
 	model = "AsiaRF AWAPN2403";
@@ -24,7 +26,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/AWM002-EVB-4M.dts

@@ -2,6 +2,8 @@
 
 #include "AWM002-4M.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "AsiaRF AWM002 EVB";
 
@@ -33,13 +35,13 @@
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		mode {
 			label = "mode";
 			gpios = <&gpio0 20 1>;
-			linux,code = <0x32>;
+			linux,code = <ABS_MT_WIDTH_MAJOR>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/AWM002-EVB-8M.dts

@@ -2,6 +2,8 @@
 
 #include "AWM002-8M.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	model = "AsiaRF AWM002 EVB";
 
@@ -33,13 +35,13 @@
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		mode {
 			label = "mode";
 			gpios = <&gpio0 20 1>;
-			linux,code = <0x32>;
+			linux,code = <ABS_MT_WIDTH_MAJOR>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/AWM003-EVB.dts

@@ -2,6 +2,8 @@
 
 #include "AWM002-8M.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "AWM003", "ralink,rt5350-soc";
 	model = "AsiaRF AWM003 EVB";
@@ -39,13 +41,13 @@
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		mode {
 			label = "mode";
 			gpios = <&gpio0 20 1>;
-			linux,code = <0x32>;
+			linux,code = <ABS_MT_WIDTH_MAJOR>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/ArcherC20i.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ralink,mt7620a-soc";
 	model = "TP-Link Archer C20i";
@@ -41,12 +43,12 @@
 		rfkill {
 			label = "rfkill";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0xf7>;
+			linux,code = <KEY_RFKILL>;
 		};
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/BC2.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "BC2", "ralink,rt3052-soc";
 	model = "NexAira BC2";
@@ -56,7 +58,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 17 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/BR-6425.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "BR-6425", "ralink,rt3052-soc";
 	model = "Edimax BR-6425";
@@ -38,13 +40,13 @@
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		rfkill {
 			label = "RFKILL switch";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0xf7>;
+			linux,code = <KEY_RFKILL>;
 		};
 	};
 };

+ 5 - 3
target/linux/ramips/dts/BR-6475ND.dts

@@ -2,6 +2,8 @@
 
 #include "rt3883.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "BR-6475ND", "ralink,rt3883-soc";
 	model = "Edimax BR-6475nD";
@@ -15,14 +17,14 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		rfkill {
 			label = "rfkill";
 			gpios = <&gpio0 9 1>;
-			linux,input-type = <5>;
-			linux,code = <0xf7>;
+			linux,input-type = <EV_SW>;
+			linux,code = <KEY_RFKILL>;
 		};
 	};
 

+ 3 - 1
target/linux/ramips/dts/BROADWAY.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "BROADWAY", "ralink,rt3052-soc";
 	model = "Hauppauge Broadway";
@@ -61,7 +63,7 @@
 		factory {
 			label = "Factory Reset button";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/CF-WR800N.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620n.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "cf-wr800n", "ralink,mt7620n-soc";
 	model = "Comfast CF-WR800N";
@@ -38,7 +40,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/CS-QR10.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ralink,mt7620a-soc";
 	model = "Planex CS-QR10";
@@ -35,13 +37,13 @@
 		s1 {
 			label = "reset";
 			gpios = <&gpio1 1 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		s2 {
 			label = "wps";
 			gpios = <&gpio1 3 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/CY-SWR1100.dts

@@ -2,6 +2,8 @@
 
 #include "rt3883.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "CY-SWR1100", "ralink,rt3883-soc";
 	model = "Samsung CY-SWR1100";
@@ -64,13 +66,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 6 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 3 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 3 - 1
target/linux/ramips/dts/D105.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "D105", "ralink,rt3050-soc";
 	model = "Huawei D105";
@@ -61,7 +63,7 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 6 - 4
target/linux/ramips/dts/DAP-1350.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DAP-1350", "ralink,rt3052-soc";
 	model = "D-Link DAP-1350";
@@ -76,25 +78,25 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		rt {
 			label = "rt";
 			gpios = <&gpio0 11 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 
 		ap {
 			label = "ap";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0x101>;
+			linux,code = <BTN_1>;
 		};
 	};
 };

+ 3 - 1
target/linux/ramips/dts/DB-WRT01.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ralink,mt7620a-soc";
 	model = "Planex DB-WRT01";
@@ -24,7 +26,7 @@
 		s1 {
 			label = "wps";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DCH-M225.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
 	model = "D-Link DCH-M225";
@@ -15,13 +17,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 11 1>;
-			linux,code = <0xf7>;
+			linux,code = <KEY_RFKILL>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio1 2 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DCS-930.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DCS-930", "ralink,rt3050-soc";
 	model = "D-Link DCS-930";
@@ -76,13 +78,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x101>;
+			linux,code = <BTN_1>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DCS-930L-B1.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DCS-930L-B1", "ralink,rt5350-soc";
 	model = "D-Link DCS-930L B1";
@@ -29,13 +31,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 20 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DIR-300-B1.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-300-B1", "ralink,rt3050-soc";
 	model = "D-Link DIR-300 B1";
@@ -47,13 +49,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-300-B7.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-300-B7", "ralink,rt5350-soc";
 	model = "D-Link DIR-300 B7";
@@ -29,13 +31,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DIR-320-B1.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-320-B1", "ralink,rt5350-soc";
 	model = "D-Link DIR-320 B1";
@@ -34,13 +36,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-600-B1.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-600-B1", "ralink,rt3050-soc";
 	model = "D-Link DIR-600 B1";
@@ -47,13 +49,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-600-B2.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-600-B2", "ralink,rt3050-soc";
 	model = "D-Link DIR-600 B2";
@@ -47,13 +49,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-610-A1.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-610-A1", "ralink,rt5350-soc";
 	model = "D-Link DIR-610 A1";
@@ -29,13 +31,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DIR-615-D.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-615-D", "ralink,rt3050-soc";
 	model = "D-Link DIR-615 D";
@@ -47,13 +49,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-615-H1.dts

@@ -2,6 +2,8 @@
 
 #include "rt3352.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-615-H1", "ralink,rt3352-soc";
 	model = "D-Link DIR-615 H1";
@@ -44,13 +46,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DIR-620-A1.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-620-A1", "ralink,rt3050-soc";
 	model = "D-Link DIR-620 A1";
@@ -47,13 +49,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 3 - 1
target/linux/ramips/dts/DIR-620-D1.dts

@@ -2,6 +2,8 @@
 
 #include "rt3352.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-620-D1", "ralink,rt3352-soc";
 	model = "D-Link DIR-620 D1";
@@ -29,7 +31,7 @@
 		reset_wps {
 			label = "reset_wps";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DIR-645.dts

@@ -2,6 +2,8 @@
 
 #include "rt3883.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "DIR-645", "ralink,rt3883-soc";
 	model = "D-Link DIR-645";
@@ -22,13 +24,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 9 0>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 14 0>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-810L.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
 	model = "D-Link DIR-810L";
@@ -15,13 +17,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 1 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/DIR-860L-B1.dts

@@ -2,6 +2,8 @@
 
 #include "mt7621.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc";
 	model = "D-Link DIR-860L B1";
@@ -48,13 +50,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 7 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 18 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/DUZUN-DM06.dts

@@ -2,6 +2,8 @@
 
 #include "mt7628an.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "duzun,dm06-mt7628an", "mediatek,mt7628an-soc";
 	model = "DuZun DM06";
@@ -20,13 +22,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio1 14 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio1 6 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/E1700.dts

@@ -12,6 +12,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "linksys,e1700", "ralink,mt7620a-soc";
 	model = "Linksys E1700";
@@ -25,13 +27,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 1 0>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 2 0>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 

+ 4 - 2
target/linux/ramips/dts/ESR-9753.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ESR-9753", "ralink,rt3052-soc";
 	model = "Senao / EnGenius ESR-9753";
@@ -61,13 +63,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/EX2700.dts

@@ -12,6 +12,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "ralink,mt7620a-soc";
 	model = "Netgear EX2700";
@@ -69,13 +71,13 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 1 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/F5D8235_V1.dts

@@ -2,6 +2,8 @@
 
 #include "rt2880.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -55,13 +57,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 0 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 9 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 	};
 

+ 5 - 3
target/linux/ramips/dts/F7C027.dts

@@ -2,6 +2,8 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "F7C027", "ralink,rt5350-soc";
 	model = "Belkin F7C027";
@@ -39,19 +41,19 @@
 		top {
 			label = "restore";
 			gpios = <&gpio0 10 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		power {
 			label = "power";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0xf7>;
+			linux,code = <KEY_RFKILL>;
 		};
 
 		sensor {
 			label = "sensor";
 			gpios = <&gpio0 14 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 	};
 };

+ 4 - 2
target/linux/ramips/dts/FIREWRT.dts

@@ -2,6 +2,8 @@
 
 #include "mt7621.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
 	model = "Firefly FireWRT";
@@ -33,13 +35,13 @@
 		wps {
 			label = "wps";
 			gpios = <&gpio0 18 1>;
-			linux,code = <0x211>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 
 		power {
 			label = "power";
 			gpios = <&gpio0 23 1>;
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 		};
 	};
 };

+ 5 - 3
target/linux/ramips/dts/FONERA20N.dts

@@ -2,6 +2,8 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "FONERA20N", "ralink,rt3052-soc";
 	model = "La Fonera 2.0N";
@@ -66,14 +68,14 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 12 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		switch {
 			label = "switch";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0xf7>;
-			linux,input-type = <5>; /* EV_SW */
+			linux,code = <KEY_RFKILL>;
+			linux,input-type = <EV_SW>;
 		};
 	};
 };

+ 5 - 3
target/linux/ramips/dts/GL-MT300A.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "GL-MT300A", "ralink,mt7620a-soc";
 	model = "GL-MT300A";
@@ -43,19 +45,19 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		BTN_0 {
 			label = "BTN_0";
 			gpios = <&gpio0 1 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 
   	    BTN_1 {
 			label = "BTN_1";
 			gpios = <&gpio0 2 1>;
-			linux,code = <0x101>;
+			linux,code = <BTN_1>;
 		};
  	};
 };

+ 5 - 3
target/linux/ramips/dts/GL-MT300N.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "GL-MT300N", "ralink,mt7620a-soc";
 	model = "GL-MT300N";
@@ -38,19 +40,19 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 1 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		BTN_0 {
 			label = "BTN_0";
 			gpios = <&gpio2 2 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 
   	    BTN_1 {
 			label = "BTN_1";
 			gpios = <&gpio2 3 1>;
-			linux,code = <0x101>;
+			linux,code = <BTN_1>;
 		};
 	};
 };

+ 5 - 3
target/linux/ramips/dts/GL-MT750.dts

@@ -2,6 +2,8 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/input/input.h>
+
 / {
 	compatible = "GL-MT750", "ralink,mt7620a-soc";
 	model = "GL-MT750";
@@ -38,19 +40,19 @@
 		reset {
 			label = "reset";
 			gpios = <&gpio0 13 1>;
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		BTN_0 {
 			label = "BTN_0";
 			gpios = <&gpio2 2 1>;
-			linux,code = <0x100>;
+			linux,code = <BTN_0>;
 		};
 
   	    BTN_1 {
 			label = "BTN_1";
 			gpios = <&gpio2 3 1>;
-			linux,code = <0x101>;
+			linux,code = <BTN_1>;
 		};
  	};
 };

Some files were not shown because too many files changed in this diff