realtek: convert to new LED color/function format where possible
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 7 Feb 2024 13:48:44 +0000 (14:48 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 7 Feb 2024 13:48:44 +0000 (14:48 +0100)
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 <ansuelsmth@gmail.com>
target/linux/realtek/dts-5.15/rtl8380_engenius_ews2910p.dts
target/linux/realtek/dts-5.15/rtl8380_tplink_sg2xxx.dtsi
target/linux/realtek/dts-5.15/rtl83xx_d-link_dgs-1210_common.dtsi

index 9b5ddb5ed4110f3c1d67a2c9506f4ba74d2c9eab..289ec8627407e362980146bc049499ca9ea8f207 100644 (file)
@@ -3,6 +3,7 @@
 #include "rtl838x.dtsi"
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -79,7 +80,8 @@
                compatible = "gpio-leds";
 
                led_power: led-0 {
-                       label = "green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
                };
 
@@ -89,7 +91,8 @@
                };
 
                led_fault: led-2 {
-                       label = "amber:fault";
+                       function = LED_FUNCTION_FAULT;
+                       color = <LED_COLOR_ID_AMBER>;
                        gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
                };
 
index 0706c55524bb97f44939c23d791375d102a1c384..d30d7b374e72711e0117bbb039c9e59461558ade 100644 (file)
@@ -3,6 +3,7 @@
 #include "rtl838x.dtsi"
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -38,7 +39,8 @@
                compatible = "gpio-leds";
 
                led_power: led-0 {
-                       label = "green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
                };
        };
index 1e3cafa9381d8d5b1992f771c5185f1513bb3d98..fa623d7a9006ae20a636b0309d389097f8ec60e3 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -22,7 +23,8 @@
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
        };