Jelajahi Sumber

ath79: convert to new LED color/function format where possible

Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.

Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 1 tahun lalu
induk
melakukan
e3ddfcc70c
100 mengubah file dengan 580 tambahan dan 226 penghapusan
  1. 3 1
      target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
  2. 5 2
      target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
  3. 5 2
      target/linux/ath79/dts/ar7161_aruba_ap-105.dts
  4. 3 1
      target/linux/ath79/dts/ar7161_aruba_ap-175.dts
  5. 3 1
      target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
  6. 9 4
      target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
  7. 7 3
      target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts
  8. 7 3
      target/linux/ath79/dts/ar7161_meraki_mr16.dts
  9. 3 1
      target/linux/ath79/dts/ar7161_netgear_wndap360.dts
  10. 13 6
      target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
  11. 5 2
      target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi
  12. 5 2
      target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
  13. 3 1
      target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts
  14. 5 2
      target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
  15. 13 6
      target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
  16. 7 3
      target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts
  17. 13 6
      target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
  18. 7 3
      target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
  19. 7 3
      target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts
  20. 9 4
      target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
  21. 3 1
      target/linux/ath79/dts/ar7240_tplink.dtsi
  22. 4 1
      target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
  23. 4 1
      target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
  24. 13 6
      target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
  25. 15 7
      target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
  26. 4 1
      target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts
  27. 4 1
      target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts
  28. 4 1
      target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts
  29. 3 1
      target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
  30. 4 1
      target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
  31. 7 3
      target/linux/ath79/dts/ar7242_avm_fritz300e.dts
  32. 3 1
      target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi
  33. 3 1
      target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
  34. 5 2
      target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
  35. 5 2
      target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
  36. 7 3
      target/linux/ath79/dts/ar7242_meraki_mr12.dts
  37. 5 2
      target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts
  38. 3 1
      target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi
  39. 3 1
      target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
  40. 5 2
      target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts
  41. 3 1
      target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts
  42. 5 2
      target/linux/ath79/dts/ar9330_dlink_dir-505.dts
  43. 5 2
      target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
  44. 7 3
      target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
  45. 5 2
      target/linux/ath79/dts/ar9330_pqi_air-pen.dts
  46. 3 1
      target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
  47. 3 1
      target/linux/ath79/dts/ar9331_8dev_carambola2.dts
  48. 5 2
      target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
  49. 5 2
      target/linux/ath79/dts/ar9331_arduino_yun.dts
  50. 3 1
      target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
  51. 3 1
      target/linux/ath79/dts/ar9331_etactica_eg200.dts
  52. 5 2
      target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
  53. 7 3
      target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts
  54. 5 2
      target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts
  55. 5 2
      target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
  56. 5 2
      target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
  57. 7 3
      target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
  58. 5 2
      target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
  59. 5 2
      target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
  60. 5 2
      target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts
  61. 5 2
      target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts
  62. 7 3
      target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi
  63. 7 3
      target/linux/ath79/dts/ar9341_pcs_cr3000.dts
  64. 7 3
      target/linux/ath79/dts/ar9341_tplink.dtsi
  65. 4 1
      target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts
  66. 6 2
      target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts
  67. 12 5
      target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts
  68. 6 2
      target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts
  69. 4 1
      target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
  70. 3 1
      target/linux/ath79/dts/ar9342_iodata_etg3-r.dts
  71. 3 1
      target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
  72. 4 1
      target/linux/ath79/dts/ar9342_ruckus_zf7321.dts
  73. 12 5
      target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts
  74. 6 2
      target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts
  75. 6 2
      target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts
  76. 6 2
      target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts
  77. 5 2
      target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
  78. 3 1
      target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
  79. 5 2
      target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts
  80. 3 1
      target/linux/ath79/dts/ar9344_atheros_db120.dts
  81. 7 3
      target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
  82. 3 1
      target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts
  83. 3 1
      target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
  84. 14 6
      target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts
  85. 12 5
      target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts
  86. 6 2
      target/linux/ath79/dts/ar9344_engenius_eap600.dts
  87. 4 1
      target/linux/ath79/dts/ar9344_engenius_ecb600.dts
  88. 9 4
      target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts
  89. 6 2
      target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts
  90. 6 2
      target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts
  91. 6 2
      target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts
  92. 4 1
      target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts
  93. 13 6
      target/linux/ath79/dts/ar9344_netgear_r6100.dts
  94. 9 4
      target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
  95. 4 1
      target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi
  96. 6 2
      target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi
  97. 3 1
      target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
  98. 6 2
      target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts
  99. 6 2
      target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts
  100. 7 3
      target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts

+ 3 - 1
target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Sitecom WLR-7100 (X7 AC1200)";
@@ -41,7 +42,8 @@
 		};
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 5 - 2
target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	chosen {
@@ -33,12 +34,14 @@
 		};
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
 		};
 
 		led_status_yellow: status_yellow {
-			label = "yellow:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar7161_aruba_ap-105.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "aruba,ap-105", "qca,ar7161";
@@ -25,12 +26,14 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_red: power_red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 			panic-indicator;
 		};

+ 3 - 1
target/linux/ath79/dts/ar7161_aruba_ap-175.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "aruba,ap-175", "qca,ar7161";
@@ -37,7 +38,8 @@
         /* These external LEDs are visible from the bottom panel */
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio_ext 5 GPIO_ACTIVE_HIGH>;
 			panic-indicator;
 		};

+ 3 - 1
target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -30,7 +31,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";

+ 9 - 4
target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "dlink,dir-825-b1", "qca,ar7161";
@@ -20,25 +21,29 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "fortinet,fap-220-b", "qca,ar7161";
@@ -36,18 +37,21 @@
 		compatible = "gpio-leds";
 
 		led_power: power-green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
 
 		status-green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 		};
 
 		status-yellow {
-			label = "yellow:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			panic-indicator;
 		};

+ 7 - 3
target/linux/ath79/dts/ar7161_meraki_mr16.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "meraki,mr16", "qca,ar7161";
@@ -40,18 +41,21 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
 			panic-indicator;
 		};
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ath79/dts/ar7161_netgear_wndap360.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "netgear,wndap360", "qca,ar7161";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 13 - 6
target/linux/ath79/dts/ar7161_netgear_wndr.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -18,7 +19,8 @@
 		compatible = "reset-leds";
 
 		usb_led {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			resets = <&rst 12>;
 			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
@@ -29,28 +31,33 @@
 		compatible = "gpio-leds";
 
 		wps {
-			label = "orange:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wps_green {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "ruckus,gd11", "qca,ar7161";
@@ -40,13 +41,15 @@
 		};
 
 		led_power_green: power-green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
 
 		led_power_red: power-red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
 			panic-indicator;
 		};

+ 5 - 2
target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "siemens,ws-ap3610", "qca,ar7161";
@@ -21,12 +22,14 @@
 		compatible = "gpio-leds";
 
 		led_power_green: led_power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_red: led_power_red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "trendnet,tew-673gru", "qca,ar7161";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,whr-g301n", "qca,ar7240";
@@ -90,7 +91,8 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -99,7 +101,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 13 - 6
target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "D-Link DIR-615 E4";
@@ -40,17 +41,20 @@
 		pinctrl-0 = <&switch_led_pins>;
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
@@ -75,12 +79,14 @@
 		};
 
 		wan_amber {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -89,7 +95,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 7 - 3
target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,enh202-v1", "qca,ar7240";
@@ -50,12 +51,14 @@
 		};
 
 		lan {
-			label = "amber:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -64,7 +67,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 13 - 6
target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -55,23 +56,27 @@
 		pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_amber {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
@@ -120,12 +125,14 @@
 		compatible = "gpio-leds";
 
 		wps_green {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan_blue {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 7 - 3
target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -34,7 +35,8 @@
 		pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 
@@ -49,7 +51,8 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -58,7 +61,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 7 - 3
target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "openmesh,om2p-v1", "qca,ar7240";
@@ -38,7 +39,8 @@
 		pinctrl-0 = <&switch_led_disable_pins>;
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
@@ -60,12 +62,14 @@
 		};
 
 		lan_blue {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_blue {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 9 - 4
target/linux/ath79/dts/ar7240_ruckus_zf7025.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 
 / {
@@ -71,25 +72,29 @@
 		};
 
 		led_power_red: power-red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			panic-indicator;
 		};
 
 		led_power_green: power-green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wlan-green {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0assoc";
 		};
 
 		wlan-yellow {
-			label = "yellow:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_YELLOW>;
 			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar7240_tplink.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -53,7 +54,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi

@@ -1,10 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7240_tplink.dtsi"
 
 &leds {
 	lan {
-		label = "green:lan";
+		function = LED_FUNCTION_LAN;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 	};
 };

+ 4 - 1
target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7240_tplink.dtsi"
 
 &leds {
@@ -24,7 +26,8 @@
 	};
 
 	wan {
-		label = "green:wan";
+		function = LED_FUNCTION_WAN;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 	};
 };

+ 13 - 6
target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -58,12 +59,14 @@
 		pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_amber {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
@@ -108,7 +111,8 @@
 		};
 
 		wps_green {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 		};
 	};
@@ -117,18 +121,21 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 3 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
 
 		wlan_blue {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 15 - 7
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -51,12 +52,14 @@
 		pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_amber {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 		};
 
@@ -101,12 +104,14 @@
 		};
 
 		wps_green {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
 		};
 
 		usb_green {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";
@@ -117,18 +122,21 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
 
 		wlan_blue {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7241_tplink_tl-mr3x20.dtsi"
 
 / {
@@ -10,7 +12,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7241_tplink_tl-mr3x20.dtsi"
 
 / {
@@ -10,7 +12,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7241_tplink.dtsi"
 
 / {
@@ -10,7 +12,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
@@ -60,7 +61,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar7241_ubnt_airrouter.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar7241.dtsi"
 #include "ar724x_ubnt_xm.dtsi"
 
@@ -24,7 +26,8 @@
 		};
 
 		power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ath79/dts/ar7242_avm_fritz300e.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "avm,fritz300e", "qca,ar7242";
@@ -32,18 +33,21 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -39,7 +40,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
@@ -69,7 +70,8 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 5 - 2
target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,eap350-v1", "qca,ar7242";
@@ -33,7 +34,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
@@ -43,7 +45,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,ecb350-v1", "qca,ar7242";
@@ -33,7 +34,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
@@ -43,7 +45,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 7 - 3
target/linux/ath79/dts/ar7242_meraki_mr12.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "meraki,mr12", "qca,ar7242";
@@ -40,18 +41,21 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 			panic-indicator;
 		};
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wr2543-v1", "qca,ar7242";
@@ -43,12 +44,14 @@
 		compatible = "gpio-leds";
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi

@@ -3,6 +3,7 @@
 #include "ar9132.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -155,7 +156,8 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wa901nd-v2", "qca,ar9132";
@@ -49,7 +50,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132";
@@ -39,7 +40,8 @@
 		compatible = "gpio-leds";
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";
@@ -57,7 +59,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wr941-v2", "qca,ar9132";
@@ -54,7 +55,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9330_dlink_dir-505.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "D-Link DIR-505";
@@ -38,12 +39,14 @@
 		pinctrl-0 = <&jtag_disable_pins>;
 
 		led_power_green: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
 		};
 
 		led_status_red: status {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "GL.iNet GL-AR150";
@@ -21,7 +22,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "orange:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
@@ -32,7 +34,8 @@
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};

+ 7 - 3
target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	chosen {
@@ -40,13 +41,15 @@
 		};
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		lan_blue {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
@@ -62,7 +65,8 @@
 		};
 
 		wan_blue {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar9330_pqi_air-pen.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "PQI Air-Pen";
@@ -19,13 +20,15 @@
 		compatible = "gpio-leds";
 
 		led_wlan: wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 3 - 1
target/linux/ath79/dts/ar9330_ziking_cpe46b.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "ZiKing CPE46B";
@@ -17,7 +18,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar9331_8dev_carambola2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "8devices Carambola2";
@@ -17,7 +18,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -35,7 +36,8 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
@@ -45,7 +47,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9331_arduino_yun.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Arduino Yun";
@@ -49,13 +50,15 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		usb {
-			label = "white:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Embedded Wireless Dorin";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ath79/dts/ar9331_etactica_eg200.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "eTactica EG200";
@@ -45,7 +46,8 @@
 		};
 
 		wlan {
-			label = "red:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9331_glinet_64xx.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	keys {
@@ -21,13 +22,15 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "red:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
 		};
 	};

+ 7 - 3
target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "glinet,gl-mifi", "qca,ar9331";
@@ -17,18 +18,21 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
 		};
 

+ 5 - 2
target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "glinet,gl-usb150", "qca,ar9331";
@@ -21,13 +22,15 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "HiWiFi HC6361";
@@ -37,11 +38,13 @@
 			default-state = "on";
 		};
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Teltonika RUT230 v1";
@@ -82,13 +83,15 @@
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			/* GPIO 13 - ACTIVE HIGH for hwrev 0 */
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 			/* GPIO 14 - ACTIVE HIGH for hwrev 0 */
 		};

+ 7 - 3
target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "TP-Link TL-MR3020 V1";
@@ -21,18 +22,21 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
 		led_wps: wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "TP-Link TL-MR3040 V2";
@@ -22,13 +23,15 @@
 		pinctrl-0 = <&switch_led_disable_pins>;
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		led_lan: lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 

+ 5 - 2
target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
@@ -72,12 +73,14 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Engenius EAP300 v2";
@@ -32,13 +33,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Engenius ENS202EXT v1";
@@ -32,13 +33,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wlan {
-			label = "amber:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 7 - 3
target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	chosen {
@@ -35,7 +36,8 @@
 		compatible = "gpio-leds";
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
@@ -57,12 +59,14 @@
 		};
 
 		lan_blue {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_blue {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 7 - 3
target/linux/ath79/dts/ar9341_pcs_cr3000.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "PowerCloud Systems CR3000";
@@ -41,19 +42,22 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wlan2g {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		wan {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 

+ 7 - 3
target/linux/ath79/dts/ar9341_tplink.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -17,13 +18,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
@@ -34,7 +37,8 @@
 		};
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 

+ 4 - 1
target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9341_tplink.dtsi"
 
 / {
@@ -31,7 +33,8 @@
 
 &leds {
 	usb {
-		label = "green:usb";
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&hub_port>;
 		linux,default-trigger = "usbport";

+ 6 - 2
target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9341_tplink_tl-wa.dtsi"
 
 / {
@@ -35,12 +37,14 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 12 - 5
target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9341_tplink_tl-wa.dtsi"
 
 / {
@@ -42,29 +44,34 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan_green {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		wlan_orange {
-			label = "orange:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9341_tplink_tl-wa.dtsi"
 
 / {
@@ -28,12 +30,14 @@
 		compatible = "gpio-leds";
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 4 - 1
target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9341_tplink.dtsi"
 
 / {
@@ -41,7 +43,8 @@
 
 &leds {
 	usb {
-		label = "green:usb";
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&hub_port>;
 		linux,default-trigger = "usbport";

+ 3 - 1
target/linux/ath79/dts/ar9342_iodata_etg3-r.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "iodata,etg3-r", "qca,ar9344";
@@ -20,7 +21,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 3 - 1
target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -85,7 +86,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};

+ 4 - 1
target/linux/ath79/dts/ar9342_ruckus_zf7321.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar934x_ruckus_zf73xx.dtsi"
 
 / {
@@ -18,7 +20,8 @@
 		};
 
 		power_red: power-red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 			panic-indicator;
 		};

+ 12 - 5
target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9342_zyxel_nwa11xx.dtsi"
 
 / {
@@ -17,29 +19,34 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
 
 		led_status_red: status_red {
-			label = "red:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 
 		led_wlan_green: wlan_green {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		led_lan_green: lan_green {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
 		led_lan_amber: lan_amber {
-			label = "amber:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9342_zyxel_nwa11xx.dtsi"
 
 / {
@@ -18,13 +20,15 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_status_amber: status_amber {
-			label = "amber:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9342_zyxel_nwa11xx.dtsi"
 
 / {
@@ -18,13 +20,15 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_status_amber: status_amber {
-			label = "amber:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9342_zyxel_nwa11xx.dtsi"
 
 / {
@@ -18,13 +20,15 @@
 		compatible = "gpio-leds";
 
 		led_status_green: status_green {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		led_status_amber: status_amber {
-			label = "amber:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 5 - 2
target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "aerohive,hiveap-121", "qca,ar9344";
@@ -36,12 +37,14 @@
 		compatible = "gpio-leds";
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_white: power_white {
-			label = "white:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ath79/dts/ar9344_alfa-network_n5q.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "ALFA Network N5Q";
@@ -72,7 +73,8 @@
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 5 - 2
target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts

@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "araknis,an-300-ap-i-n", "qca,ar9344";
@@ -31,7 +32,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "off";
 		};
@@ -43,7 +45,8 @@
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 3 - 1
target/linux/ath79/dts/ar9344_atheros_db120.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -39,7 +40,8 @@
 		};
 
 		usb {
-			label = "green:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";

+ 7 - 3
target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "comfast,cf-e120a-v3", "qca,ar9344";
@@ -23,17 +24,20 @@
 		pinctrl-0 = <&led_rssimediumhigh_pin>;
 
 		wan {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 
 		lan {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "green:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};

+ 3 - 1
target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "compex,wpj344-16m", "qca,ar9344";
@@ -21,7 +22,8 @@
 		compatible = "gpio-leds";
 
 		led_status: status {
-			label = "green:status";
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 

+ 3 - 1
target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	aliases {
@@ -17,7 +18,8 @@
 		compatible = "gpio-leds";
 
 		wlan {
-			label = "white:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};

+ 14 - 6
target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_dlink_dir-8x5.dtsi"
 
 / {
@@ -20,19 +22,22 @@
 		pinctrl-0 = <&enable_gpio_11>;
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "usbport";
 			trigger-sources = <&hub_port>;
 		};
 
 		wan_blue {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 
@@ -43,17 +48,20 @@
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_orange {
-			label = "orange:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 12 - 5
target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_dlink_dir-8x5.dtsi"
 
 / {
@@ -17,27 +19,32 @@
 		compatible = "gpio-leds";
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 
 		wps {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_orange {
-			label = "orange:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 6 - 2
target/linux/ath79/dts/ar9344_engenius_eap600.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_senao_ap-dual.dtsi"
 
 / {
@@ -10,13 +12,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wps {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 

+ 4 - 1
target/linux/ath79/dts/ar9344_engenius_ecb600.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_senao_ap-dual.dtsi"
 
 / {
@@ -10,7 +12,8 @@
 		compatible = "gpio-leds";
 
 		led_power: power {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 9 - 4
target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "enterasys,ws-ap3705i", "qca,ar9344";
@@ -45,22 +46,26 @@
 		pinctrl-0 = <&enable_gpio_11 &enable_gpio_16>;
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_red: power_red {
-			label = "red:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		lan_blue {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
 		};
 
 		lan_green {
-			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
 		};
 

+ 6 - 2
target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_fortinet_ap-dual.dtsi"
 
 / {
@@ -14,13 +16,15 @@
 		compatible = "gpio-leds";
 
 		led_power: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 

+ 6 - 2
target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_mikrotik_routerboard.dtsi"
 #include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
 
@@ -13,12 +15,14 @@
 	pinctrl-0 = <&enable_gpio_20>;
 
 	lan {
-		label = "green:lan";
+		function = LED_FUNCTION_LAN;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
 	};
 
 	power {
-		label = "green:power";
+		function = LED_FUNCTION_POWER;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 		default-state = "on";
 	};

+ 6 - 2
target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_mikrotik_routerboard.dtsi"
 #include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
 
@@ -10,7 +12,8 @@
 
 &leds {
 	power {
-		label = "blue:power";
+		function = LED_FUNCTION_POWER;
+		color = <LED_COLOR_ID_BLUE>;
 		gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 		default-state = "on";
 	};
@@ -21,7 +24,8 @@
 	};
 
 	lan {
-		label = "green:lan";
+		function = LED_FUNCTION_LAN;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 	};
 };

+ 4 - 1
target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_mikrotik_routerboard.dtsi"
 
 / {
@@ -24,7 +26,8 @@
 
 &leds {
 	power {
-		label = "green:power";
+		function = LED_FUNCTION_POWER;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 		default-state = "on";
 	};

+ 13 - 6
target/linux/ath79/dts/ar9344_netgear_r6100.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Netgear R6100";
@@ -57,34 +58,40 @@
 		compatible = "gpio-leds";
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 
 		usb {
-			label = "blue:usb";
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&hub_port>;
 			linux,default-trigger = "usbport";
 		};
 
 		wan_amber {
-			label = "amber:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 
 		wan_green {
-			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
-			label = "blue:wlan";
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};

+ 9 - 4
target/linux/ath79/dts/ar9344_netgear_wndr.dtsi

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
@@ -48,12 +49,14 @@
 		pinctrl-0 = <&enable_gpio_11>;
 
 		led_power_green: power_green {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_amber: power_amber {
-			label = "amber:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
@@ -71,12 +74,14 @@
 		};
 
 		wps_green {
-			label = "green:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
 		wps_amber {
-			label = "amber:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
 		};
 	};

+ 4 - 1
target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi

@@ -1,8 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 &leds {
 	usb_green {
-		label = "green:usb";
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&hub_port>;
 		linux,default-trigger = "usbport";

+ 6 - 2
target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi

@@ -1,13 +1,17 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 &leds {
 	wan_green {
-		label = "green:wan";
+		function = LED_FUNCTION_WAN;
+		color = <LED_COLOR_ID_GREEN>;
 		gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
 	};
 
 	wan_amber {
-		label = "amber:wan";
+		function = LED_FUNCTION_WAN;
+		color = <LED_COLOR_ID_AMBER>;
 		gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 	};
 };

+ 3 - 1
target/linux/ath79/dts/ar9344_ocedo_raccoon.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "OCEDO Raccoon";
@@ -24,7 +25,8 @@
 		compatible = "gpio-leds";
 
 		power {
-			label = "green:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 6 - 2
target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_openmesh_mr600.dtsi"
 
 / {
@@ -23,12 +25,14 @@
 		};
 
 		wps_blue {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_orange: power_orange {
-			label = "orange:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 6 - 2
target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts

@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "ar9344_openmesh_mr600.dtsi"
 
 / {
@@ -22,12 +24,14 @@
 		};
 
 		wps_blue {
-			label = "blue:wps";
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};

+ 7 - 3
target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts

@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "openmesh,om5p-an", "qca,ar9344";
@@ -38,18 +39,21 @@
 		pinctrl-0 = <&led_lan_wan_blue_pin>;
 
 		led_power_blue: power_blue {
-			label = "blue:power";
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
 		wan_blue {
-			label = "blue:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 
 		lan_blue {
-			label = "blue:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini