openwrt/package/base-files/files
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>
2020-02-24 23:27:50 +01:00
..
bin base-files: config_generate: split macaddr with multiple ifaces 2019-11-23 11:58:27 +01:00
etc base-files: diag: restore default trigger for 'boot' LED 2020-02-24 23:27:50 +01:00
lib base-files: diag: restore default trigger for 'boot' LED 2020-02-24 23:27:50 +01:00
rom rename default/ to files/ 2006-11-22 23:30:57 +00:00
sbin base-files: use jshn lib for ubus sysupgrade argument generation 2020-01-14 00:06:03 +01:00
usr base-files: validate firmware for compatibility with backup 2019-09-08 09:10:30 +02:00