lantiq: add support for indicating the boot state using three leds
authorJohn Crispin <john@openwrt.org>
Fri, 1 Jan 2016 21:18:47 +0000 (21:18 +0000)
committerJohn Crispin <john@openwrt.org>
Fri, 1 Jan 2016 21:18:47 +0000 (21:18 +0000)
The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to
indicate the current boot state. This patch adds support for such cases.

The existing led sequences should be the same as before.

Boards which are using a led different from power (like TDW89x0) are
changed to switch of the led after boot

Signed-off-by: Mathias Kresin <openwrt@kresin.me>
SVN-Revision: 48041

33 files changed:
target/linux/lantiq/base-files/etc/board.d/01_leds
target/linux/lantiq/base-files/etc/diag.sh
target/linux/lantiq/dts/ARV4510PW.dts
target/linux/lantiq/dts/ARV4518PWR01.dtsi
target/linux/lantiq/dts/ARV4519PW.dts
target/linux/lantiq/dts/ARV4520PW.dts
target/linux/lantiq/dts/ARV4525PW.dts
target/linux/lantiq/dts/ARV452CQW.dts
target/linux/lantiq/dts/ARV7510PW22.dts
target/linux/lantiq/dts/ARV7518PW.dts
target/linux/lantiq/dts/ARV7519PW.dts
target/linux/lantiq/dts/ARV7519RW22.dts
target/linux/lantiq/dts/ARV7525PW.dts
target/linux/lantiq/dts/ARV752DPW.dts
target/linux/lantiq/dts/ARV752DPW22.dts
target/linux/lantiq/dts/ARV8539PW22.dts
target/linux/lantiq/dts/BTHOMEHUBV2B.dts
target/linux/lantiq/dts/BTHOMEHUBV3A.dts
target/linux/lantiq/dts/BTHOMEHUBV5A.dts
target/linux/lantiq/dts/DGN1000B.dts
target/linux/lantiq/dts/DGN3500.dtsi
target/linux/lantiq/dts/EASY80920.dtsi
target/linux/lantiq/dts/FRITZ3370.dts
target/linux/lantiq/dts/FRITZ7320.dts
target/linux/lantiq/dts/GR7000.dts
target/linux/lantiq/dts/H201L.dts
target/linux/lantiq/dts/P2601HNFX.dts
target/linux/lantiq/dts/P2812HNUFX.dtsi
target/linux/lantiq/dts/TDW89X0.dtsi
target/linux/lantiq/dts/VG3503J.dtsi
target/linux/lantiq/dts/VGV7510KW22.dtsi
target/linux/lantiq/dts/VGV7519.dtsi
target/linux/lantiq/dts/WBMR.dts

index a95c72c3a9a55abf36fd1a97fd19f6d2e7e66d5e..ac9e14ec5796ea95ebc95cf21a18647379aa9124 100755 (executable)
@@ -27,39 +27,21 @@ board_config_update
 board=$(lantiq_board_name)
 
 case "$board" in
-BTHOMEHUBV2B)
-       ucidef_set_led_default "power" "power" "soc:blue:power" "1"
-       ;;
-BTHOMEHUBV3A)
-       ucidef_set_led_default "power" "power" "soc:blue:power" "1"
-       ;;
 BTHOMEHUBV5A)
-       ucidef_set_led_default "power" "power" "soc:blue:power" "1"
        ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
        ;;
 VGV7510KW22)
-       ucidef_set_led_default "power" "power" "power" "1"
-       ucidef_set_led_default "power2" "power2" "power2" "0"
        ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio"
        ;;
 VGV7519)
-       ucidef_set_led_default "power" "power" "power" "0"
-       ucidef_set_led_default "power2" "power2" "power2" "1"
        ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio"
        ;;
 P2812HNUF*)
-       ucidef_set_led_default "power" "power" "power" "0"
-       ucidef_set_led_default "power2" "power2" "power2" "1"
        ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio"
        ;;
 ARV7519RW22)
-       ucidef_set_led_default "power" "power" "power" "1"
        ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
        ;;
-ARV8539PW22)
-        ucidef_set_led_default "power" "power" "soc:green:power" "1"
-        ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
-        ;;
 *)
        ;;
 esac
index 0e65e6133b537d048033da4b828f1caca29ab91c..8356bcda69a42ed9bc2be9aedbfd193408fccd4d 100644 (file)
@@ -1,54 +1,34 @@
 #!/bin/sh
-# Copyright (C) 2012-2013 OpenWrt.org
+# Copyright (C) 2010-2015 OpenWrt.org
 
 . /lib/functions/leds.sh
 . /lib/functions/lantiq.sh
 
-power="$(lantiq_get_dt_led_chosen power)"
-power1="$(lantiq_get_dt_led_chosen power1)"
-power2="$(lantiq_get_dt_led_chosen power2)"
-
-status_led="$power"
+boot="$(lantiq_get_dt_led_chosen boot)"
+failsafe="$(lantiq_get_dt_led_chosen failsafe)"
+running="$(lantiq_get_dt_led_chosen running)"
 
 set_state() {
+    status_led="$boot"
+
        case "$1" in
        preinit)
-               if [ -n "$power2" ]; then
-                       status_led_on
-                       status_led="$power2"
-                       status_led_blink_preinit
-                       status_led="$power"
-               else
-                       status_led_blink_preinit
-               fi
+               status_led_blink_preinit
                ;;
        failsafe)
-               if [ -n "$power2" ]; then
-                       led_off "$power2"
-                       status_led_blink_failsafe
-               elif [ -n "$power1" ]; then
-                       status_led_off
-                       status_led="$power1"
-                       status_led_blink_failsafe
-                       status_led="$power"
-               else
-                       status_led_blink_failsafe
-               fi
+               status_led_off
+               status_led="$failsafe"
+               status_led_blink_failsafe
                ;;
        preinit_regular)
-               if [ -n "$power2" ]; then
-                       status_led_on
-                       status_led="$power2"
-                       status_led_blink_preinit_regular
-                       status_led="$power"
-               else
-                       status_led_blink_preinit_regular
-               fi
+               status_led_blink_preinit_regular
                ;;
        done)
-               status_led_on
-               led_off "$power1"
-               led_off "$power2"
+               status_led_off
+               [ -n "$running" ] & {
+                       status_led="$running"
+                       status_led_on
+               }
                ;;
        esac
 }
index 427cd54ab950dea34c55715f66ec40832e44f7dc..18b2da8fd4b02345a64dccf52f9e8f8801ab7b99 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &adsl;
                        internet = &internet;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        usb2 = &usb2;
                        wifi = &wifi;
                power: power {
                        label = "power";
                        gpios = <&gpios 21 0>;
+                       default-state = "keep";
                };
                power2: power2 {
                        label = "power2";
index 41d17de41930dd5cec6acb4fd1b7b6385663106c..e72eb6d01beeaa16f2f3fe095bcb114155eaba8d 100644 (file)
@@ -5,9 +5,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
                        usb = &usb;
                        wifi = &wifi;
                };
                power: power {
                        label = "power";
                        gpios = <&gpio 3 0>;
+                       default-state = "keep";
                };
                dsl: dsl {
                        label = "dsl";
index 03711a0ff558fe490f0d269fae3afc9806872e37..be65337093bea485077412ada480ea0162d2602b 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
                power: power {
                        label = "power";
                        gpios = <&gpio 2 1>;
+                       default-state = "keep";
                };
                power2: power2 {
                        label = "power2";
index 642bde22fe0a8d0c85822b881283b818e3785348..d97009cc53e4209c299e7968782cfa44129d6b1f 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_blue;
+                       failsafe = &power_red;
+                       running = &power_blue;
+
                        dsl = &adsl;
                        internet = &internet;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
        gpio-leds {
                compatible = "gpio-leds";
 
-               power: power {
+               power_blue: power {
                        label = "power";
                        gpios = <&gpio 3 1>;
+                       default-state = "keep";
                };
                adsl: adsl {
                        label = "adsl";
                        label = "internet";
                        gpios = <&gpio 5 1>;
                };
-               power2: power2 {
+               power_red: power2 {
                        label = "power2";
                        gpios = <&gpio 6 1>;
                };
index b1a92a715491198f1c2e6a7b691c31b5adb06ffa..2fe3425f135227e699b35cb26a0ac906a21988d3 100644 (file)
@@ -7,10 +7,12 @@
 
        chosen {
                leds {
+                       /* we dont have a power led, lets use the online led */
+                       boot = &online;
+                       failsafe = &online;
+
                        dsl = &dsl;
                        internet = &online;
-                       /* we dont have a power led, lets use the online led */
-                       power = &online;
                        wifi = &wifi;
                };
        };
                        gpios = <&gpio 8 1>;
                };
                online: online {
-                       /*label = "online"; - we dont have a power led, lets use this one */
-                       label = "power";
+                       label = "online";
                        gpios = <&gpio 9 1>;
                };
        };
index 38618f15d0c07be78a48e3799b3de2602fabf713..1905a0865432e39b5ab6e5881c33aa678d1d0a48 100644 (file)
@@ -9,8 +9,11 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power0;
+                       failsafe = &power1;
+                       running = &power0;
+
                        internet = &dsl;
-                       power1 = &power1;
                        usb = &usb;
                        wifi = &wifi;
                };
 
        gpio-leds {
                compatible = "gpio-leds";
-               power0 {
+               power0: power0 {
                        label = "power0";
                        gpios = <&gpio 3 1>;
+                       default-state = "keep";
                };
                dsl: dsl {
                        label = "dsl";
index 6c534a920be80993e484ca592af01614d449d4b5..c92c393b9311970f278708bbf21adb994d7dd741 100644 (file)
@@ -9,8 +9,11 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power;
+                       running = &power;
+
                        internet = &internet;
-                       power = &power;
                        wifi = &wlan;
                };
        };
                power: power {
                        label = "power";
                        gpios = <&gpio 2 1>;
+                       default-state = "keep";
                };
                internet: internet {
                        label = "internet";
index 7693bc266264f027aac819b7880d8efc4997adce..31cc2597205301c389117fd704f45992be84c498 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
                power: power {
                        label = "power";
                        gpios = <&gpio 2 1>;
+                       default-state = "keep";
                };
                dsl: dsl {
                        label = "dsl";
index ed1c2e7311e5b09bd83d1a4b064a417ca9fa63b0..6daa8b1f94900d8bb8049062304b1bc8eee99156 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
-                       power2 = &power2;
                        wifi = &wifi;
                };
        };
                power: power {
                        label = "power";
                        gpios = <&gpio 2 1>;
-                       default-state = "off";
+                       default-state = "keep";
                };
                power2: power2 {
                        label = "power2";
index 8c7c3e6ed2219efa280e37f0dfc6cbd15b147036..872af54b8de849f0c9d7284d7725f516353f9a51 100644 (file)
@@ -3,14 +3,17 @@
 /include/ "vr9.dtsi"
 
 / {
-       model = "ARV7519RW22 - Astoria Networks ARV7519RW22-A-LT";
+       model = "ARV7519RW22 - Orange Livebox 2.1";
 
        chosen {
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_green;
+                       failsafe = &power_green;
+                       running = &power_green;
+
                        internet = &internet_green;
-                       power = &power_green;
                };
        };
 
                power_green: power_green {
                        label = "power";
                        gpios = <&gpio 14 1>;
-                       default-state = "on";
+                       default-state = "keep";
                };
                alarm_blue {
                        label = "alarm";
index d4345562447ee0e0ab820508ef1c96a537a0b02d..922a2c8746197636b9566862c79030ba481dc725 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power1;
+                       running = &power;
+
                        dsl = &power;
                        internet = &online;
-                       power = &power;
-                       power1 = &power1;
                        wifi = &wifi;
                };
        };
                power: power {
                        label = "power";
                        gpios = <&gpio 3 1>;
+                       default-state = "keep";
                };
                power1: power1 {
                        label = "power1";
index a26779a2a2a19cdd9539569a8bf73b4e4bd54857..d262ed10994961dde20f4e4e57a9023e8f44fe92 100644 (file)
@@ -9,9 +9,11 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power1;
+                       running = &power;
+
                        internet = &internet;
-                       power = &power;
-                       power1 = &power1;
                        wifi = &wifi;
                };
        };
index 21c7a8f2cfdda56f4c78a04ba54c1a66c8d7bdd2..363569300a5215338e91bf942fa5cbb30fc82775 100644 (file)
@@ -9,9 +9,11 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power1;
+                       running = &power;
+
                        internet = &internet;
-                       power = &power;
-                       power1 = &power1;
                        wifi = &wifi;
                };
        };
index b1f1b33417d238460dad3674ed9403b65cf18667..c78178be6013a4fa1b539365447541ae56ac9baf 100644 (file)
@@ -7,9 +7,12 @@
 
            chosen {
                    leds {
+                boot = &power_green;
+                failsafe = &power_red;
+                running = &power_green;
+
                            dsl = &dsl_green;
                            internet = &online_green;
-                           power = &power_green;
                            wifi = &wireless_green;
                    };
            };
                 power_green: power-green {
                         label = "power";
                         gpios = <&gpio 24 1>;
+                        default-state = "keep";
                 };
-                power-red {
+                power_red: power-red {
                         label = "soc:red:power";
                         gpios = <&gpio 4 1>;
                 };
index f4c2403d60abaa8ebe08227775008f7ed2d743bc..292fe7643c230d89ae035d44acb78a0c4c5528c4 100644 (file)
@@ -9,6 +9,10 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_orange;
+                       failsafe = &power_red;
+                       running = &power_blue;
+
                        internet = &broadband_blue;
                        wifi = &wireless_blue;
                };
                        gpios = <&stp0 12 0>;
                };
 
-               power-red {
+               power_red: power-red {
                        label = "soc:red:power";
                        gpios = <&stp0 13 0>;
                };
-               power-orange {
+               power_orange: power-orange {
                        label = "soc:orange:power";
                        gpios = <&stp0 14 0>;
+                       default-state = "keep";
                };
-               power-blue {
+               power_blue: power-blue {
                        label = "soc:blue:power";
                        gpios = <&stp0 15 0>;
                };
        };
-
 };
 
index 229a85f3ed71bd43b0f01d7872604c64163ed5be..2c88f4900054f6e427a9857736e16e50273cb7f5 100644 (file)
@@ -9,6 +9,10 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_orange;
+                       failsafe = &power_red;
+                       running = &power_blue;
+
                        internet = &broadband_blue;
                        wifi = &wireless_blue;
                };
                        gpios = <&gpio 12 1>;
                };
 
-               power-red {
+               power_red: power-red {
                        label = "soc:red:power";
                        gpios = <&gpio 14 1>;
                };
-               power-orange {
+               power_orange: power-orange {
                        label = "soc:orange:power";
                        gpios = <&gpio 5 1>;
+                       default-state = "keep";
                };
-               ppower-blue {
+               power_blue: power-blue {
                        label = "soc:blue:power";
                        gpios = <&gpio 1 1>;
                };
        };
-
 };
 
index 414157331f16d382976af077f8b2a4b6301ff472..6d40ccd684b99fbc957e254c0acb435bd502cc35 100644 (file)
@@ -9,6 +9,10 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_green;
+                       failsafe = &power_red;
+                       running = &power_blue;
+
                        internet = &broadband_blue;
                        wifi = &wireless_blue;
                };
        gpio-leds {
                compatible = "gpio-leds";
 
+               /* broadband-* is a single RGB led */
                broadband-red {
                        label = "soc:red:broadband";
                        gpios = <&gpio 0 1>;
                        gpios = <&gpio 8 1>;
                };
 
+               /* wireless-* is a single RGB led */
                wireless-red {
                        label = "soc:red:wireless";
                        gpios = <&gpio 9 1>;
                        gpios = <&gpio 11 1>;
                };
 
-               power-red {
+               /* power-* is a single RGB led */
+               power_red: power-red {
                        label = "soc:red:power";
                        gpios = <&gpio 12 1>;
                };
-               power-green {
+               power_green: power-green {
                        label = "soc:green:power";
                        gpios = <&gpio 14 1>;
+                       default-state = "keep";
                };
-               power-blue {
+               power_blue: power-blue {
                        label = "soc:blue:power";
                        gpios = <&gpio 15 1>;
                };
index d5d7b98d635453da5278cb782c49072308f57d62..7c4f4a52f9c776e7160e034d6c82a27fa249f7ac 100644 (file)
@@ -9,9 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
                };
        };
 
                power: power {
                        label = "power";
                        gpios = <&gpio 13 1>;
-                       default-state = "on";
+                       default-state = "keep";
                };
        };
 };
index d8ae431cfb805c63310e1fc1b1b19ccccf4cce70..b9459c554e4cf91fb2e056eba28d9fb2db9a3956 100644 (file)
@@ -5,10 +5,12 @@
                bootargs-append = "root= console=ttyLTQ0,115200";
 
                leds {
+                       boot = &power_green;
+                       failsafe = &power_red;
+                       running = &power_green;
+
                        dsl = &dsl;
                        internet = &internet;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
                        label = "usb";
                        gpios = <&gpio 22 1>;
                };
-               power: power {
+               power_green: power {
                        label = "power";
                        gpios = <&gpio 34 1>;
+                       default-state = "keep";
                };
-               power2: power2 {
+               power_red: power2 {
                        label = "power2";
                        gpios = <&gpio 39 1>;
                };
index bdd759687a302af80281f4c61cce2c4e7b377c81..14a020fc4f642204ca48f65c3147d9606a4da43e 100644 (file)
@@ -5,7 +5,10 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
-                       power = &power;
+                       boot = &power;
+                       failsafe = &power;
+                       running = &power;
+
                        usb = &usb1;
                        usb2 = &usb2;
                };
                power: power {
                        label = "power";
                        gpios = <&stp 9 0>;
-                       default-state = "on";
+                       default-state = "keep";
                };
                warning {
                        label = "warning";
index a652b9b1bb032dfb0aacf41c1960e79d6e56f0de..216f5ffca04d011bfdd33cf858e2482e7b19f448 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
 
                leds {
+                       boot = &power_green;
+                       failsafe = &power_red;
+                       running = &power_green;
+
                        dsl = &dsl;
                        internet = &info_green;
-                       power = &power;
-                       power2 = &power2;
                        wifi = &wifi;
                };
        };
        gpio-leds {
                compatible = "gpio-leds";
 
-               power: power {
+               power_green: power {
                        label = "power";
                        gpios = <&gpio 32 1>;
+                       default-state = "keep";
                };
-               power2: power2 {
+               power_red: power2 {
                        label = "power2";
                        gpios = <&gpio 33 1>;
                };
index b5aa5e86bd58154c7afe58503d9332041fdb5663..0a307b97a2cd87eb73a5457026ec04f907757f92 100644 (file)
@@ -9,9 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power;
+                       running = &power;
+
                        dsl = &power;
                        internet = &online;
-                       power = &power;
                        wifi = &wlan;
                };
        };
                power: power {
                        label = "power";
                        gpios = <&gpio 44 1>;
+                       default-state = "keep";
                };
                voice {
                        label = "voice";
index 9f3ba65f1b8102b0000c23ae7c0575af052469e1..b6c2c0b5a635881f52c9ea585d06bc0b99d24ffa 100644 (file)
@@ -9,8 +9,10 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_red;
+                       failsafe = &power_red;
+
                        internet = &internet;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
        gpio-leds {
                compatible = "gpio-leds";
 
-               power2: power2 {
+               power_red: power2 {
                        label = "power2";
                        gpios = <&stp 4 0>;
                };
                internet: internet {
                        label = "internet";
                        gpios = <&stp 2 1>;
-                       default-state = "off";
                };
                internet2 {
                        label = "internet2";
index 1f1de0187a2d700ac533b4f99a3aff16af6730d8..e4da1e5de4834b2e6b57d834824a40d3c05bf8c9 100644 (file)
@@ -9,9 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power_green;
+                       failsafe = &power_green;
+                       running = &power_green;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
                        usb = &usb;
                        wifi = &wifi;
                };
        gpio-leds {
                compatible = "gpio-leds";
 
-               power: power {
+               power_green: power {
                        label = "power";
                        gpios = <&gpio 19 1>;
-                       default-state = "on";
+                       default-state = "keep";
                };
                online: online {
                        label = "online";
index 3193c3954c9a884d05b1b2b93632bbf05a5e6497..58e61d164e82c1cb57fb3bf1211fad8fd20727f1 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
-                       power2 = &power2;
                        wifi = &wifi;
                };
        };
                power: power {
                        label = "power";
                        gpios = <&stp 11 1>;
-                       default-state = "on";
+                       default-state = "keep";
                };
                power2: power2 {
                        label = "power2";
index a03129f59e08f880f69f3b353eff8ba335154997..7199d9a8654c0bec160b0d7857adaa4dd78ddd74 100644 (file)
@@ -5,10 +5,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power2;
+                       failsafe = &power;
+                       running = &power2;
+
                        dsl = &dsl;
                        internet = &internet_green;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb1;
                        usb2 = &usb2;
                        wifi = &wireless_green;
                power2: power2 {                                /* green */
                        label = "power2";
                        gpios = <&stp 23 1>;
+                       default-state = "keep";
                };
                usb1: usb1 {                                    /* green */
                        label = "usb1";
index 3d9e59e2efdedb65e6a96d0b7377359440c7288f..04bb5a45038304c1d7153c7e5f585706eb983ff3 100644 (file)
@@ -5,10 +5,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       /* the power led can't be controlled, use the wps led instead */
+                       boot = &wps;
+                       failsafe = &wps;
+
                        dsl = &dsl;
                        internet = &internet;
-                       /* the power led can't be controlled, use the wps led instead */
-                       power = &wps;
                        usb = &usb0;
                        usb2 = &usb2;
                };
index e56792353464e6006cc59291f9bc412cb4cf9681..fe192a358f889d4937851505c64261ab7aaf1dd4 100644 (file)
@@ -7,9 +7,11 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        internet = &dsl;
-                       power = &power;
-                       power2 = &power2;
                };
        };
 
                power: power {
                        label = "power";
                        gpios = <&gpio 28 1>;
+                       default-state = "keep";
                };
        };
 };
index 3cc2e1d62e016c5952cee1a88782ed4c9a1c2971..dc2738ad8e091ffed27a113676305c9525940a8b 100644 (file)
@@ -7,10 +7,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &internet_green;
-                       power = &power;
-                       power2 = &power2;
                        wifi = &wifi;
                };
        };
                power: power {
                        label = "power"; /* green */
                        gpios = <&gpio 14 1>;
+                       default-state = "keep";
                };
 
                info_green {
index 3ba3ac54cd19b40aeb32a231558bb0832a6c67f8..71b7d26173ee12b83174be7625d567a56a90ecfd 100644 (file)
@@ -8,10 +8,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power2;
+                       failsafe = &power;
+                       running = &power2;
+
                        dsl = &broadband_yellow;
                        internet = &internet_yellow;
-                       power = &power;
-                       power2 = &power2;
                        wifi = &wireless_yellow;
                };
        };
                power2: power2 {                                /* yellow */
                        label = "power2";
                        gpios = <&stp 14 1>;
+                       default-state = "keep";
                };
                power: power {                                  /* red */
                        label = "power";
                        gpios = <&stp 15 1>;
-                       default-state = "on";
                };
        };
 };
index dc23032ff2172ccdbafc650e1e0e9201da264bf3..1ca7668468727089a7c81e8deb9321fd7bdb3be0 100644 (file)
@@ -9,10 +9,12 @@
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
 
                leds {
+                       boot = &power;
+                       failsafe = &power2;
+                       running = &power;
+
                        dsl = &dsl;
                        internet = &online;
-                       power = &power;
-                       power2 = &power2;
                        usb = &usb;
                        wifi = &wifi;
                };
                power: power {
                        label = "power";
                        gpios = <&gpio 1 1>;
+                       default-state = "keep";
                };
                power2: power2 {
                        label = "power2";