mediatek: convert LED color/function format for Xiaomi Redmi AX6000
authorFurong Xu <xfr@outlook.com>
Mon, 4 Mar 2024 12:54:44 +0000 (20:54 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Fri, 8 Mar 2024 07:26:57 +0000 (15:26 +0800)
Commit 2d63d42f5e2f ("mediatek: convert to new LED color/function
format where possible") leaves Xiaomi Redmi AX6000 un-converted,
the two LEDs become dead.
Now, LEDs are alive again.

Fixes: 2d63d42f5e2f ("mediatek: convert to new LED color/function
format where possible")

Signed-off-by: Furong Xu <xfr@outlook.com>
target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi

index 30571965bc9e51e55175e194a87383eca9f7ff5e..4d58fbd2cf7b9bef6224e4c91db83ee448e1f706 100644 (file)
@@ -2,6 +2,7 @@
 
 /dts-v1/;
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
 
 
                led_status_rgb: led@0 {
                        reg = <0>;
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_RGB>;
                        color-index = <LED_COLOR_ID_RED LED_COLOR_ID_GREEN LED_COLOR_ID_BLUE>;
                };
 
                led_network_rgb: led@1 {
                        reg = <1>;
+
+                       /* Hardcoding here for backward compatibility */
+                       function = "network";
+
+                       color = <LED_COLOR_ID_RGB>;
                        color-index = <LED_COLOR_ID_RED LED_COLOR_ID_GREEN LED_COLOR_ID_BLUE>;
                };
        };