Explorar o código

ath79: fix LED labels for PowerCloud CAP324

The order of function and color in the labels in inverted for the
LAN LEDs. Fix it.

Fixes: 915966d86121 ("ath79: Port PowerCloud Systems CAP324 support")

Signed-off-by: Adrian Schmutzler <[email protected]>
Adrian Schmutzler %!s(int64=5) %!d(string=hai) anos
pai
achega
96023cd4ba

+ 2 - 2
target/linux/ath79/dts/ar9344_pcs_cap324.dts

@@ -58,12 +58,12 @@
 		};
 		};
 
 
 		lan_amber {
 		lan_amber {
-			label = "pcs:lan:amber";
+			label = "pcs:amber:lan";
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 		};
 		};
 
 
 		lan_green {
 		lan_green {
-			label = "pcs:lan:green";
+			label = "pcs:green:lan";
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		};
 		};
 	};
 	};

+ 1 - 1
target/linux/ath79/generic/base-files/etc/board.d/01_leds

@@ -199,7 +199,7 @@ netgear,wnr2200-16m)
 	ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02"
 	ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02"
 	;;
 	;;
 pcs,cap324)
 pcs,cap324)
-	ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
+	ucidef_set_led_netdev "lan" "LAN" "pcs:green:lan" "eth0"
 	;;
 	;;
 pcs,cr3000)
 pcs,cr3000)
 	ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
 	ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"

+ 3 - 0
target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration

@@ -21,6 +21,9 @@ engenius,epg5000)
 glinet,gl-mifi)
 glinet,gl-mifi)
 	migrate_leds ":net=:3g4g"
 	migrate_leds ":net=:3g4g"
 	;;
 	;;
+pcs,cap324)
+	migrate_leds "lan:amber=amber:lan" "lan:green=green:lan"
+	;;
 mercury,mw4530r-v1|\
 mercury,mw4530r-v1|\
 tplink,archer-c7-v2|\
 tplink,archer-c7-v2|\
 tplink,tl-wdr3600-v1|\
 tplink,tl-wdr3600-v1|\