You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Piotr Dymacz a422b171ac base-files: diag: restore default trigger for 'boot' LED
For devices without a dedicated 'diag' LED, we use sometimes one of
other LEDs for indicating at least 'boot', 'failsafe' and 'upgrade'
stages. In some cases, at the same time these LEDs have defined default
triggers in DTS using 'linux,default-trigger' property. Current 'diag'
setup removes the trigger and turns off 'boot' LED after bootup.

One of the examples of such device is TP-Link TL-WR841N v14 (ramips)
which uses 'wlan' LED with defined 'linux,default-trigger' for 'diag':

aliases {
        led-boot = &led_wlan;
        led-failsafe = &led_wlan;
        led-upgrade = &led_wlan;
};

[...]

led_wlan: wlan {
        label = "tl-wr841n-v14:green:wlan";
        gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
        linux,default-trigger = "phy0tpt";
};

This patch extends 'diag.sh' and 'leds.sh' scripts to make sure default
trigger defined in DTS is restored for 'diag' LED which isn't used for
indicating 'running' stage.

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
4 years ago
..
caldata.sh base-files: remove some bashisms 4 years ago
leds.sh base-files: diag: restore default trigger for 'boot' LED 4 years ago
migrations.sh base-files: add leds migration 5 years ago
network.sh base-files: add network_get_uptime() to /lib/functions/network.sh 5 years ago
preinit.sh base-files: fix ramoverlay function with kernels 3.18+ 9 years ago
service.sh base-files: remove function service_kill 10 years ago
system.sh base-files/system.sh: remove $ in $(()) 4 years ago
uci-defaults.sh base-files: uci-defaults: do config flush in one shot 5 years ago