Changeset 47850


Ignore:
Timestamp:
2015-12-11T16:05:30+01:00 (2 years ago)
Author:
blogic
Message:

lantiq: fix led setup after switch to uci-defaults-new.sh

The switch to uci-defaults-new.sh revealed a bug in the former used
uci-defaults.sh, which failed to add leds with colons in the led name.

This bug isn't any longer present in uci-defaults-new.sh and therefore
all via DT defined leds will be added to /etc/config/system with their initial
on/off state, regardless whether they are already added by the board specific
led mappings.

This results for a BTHOMEHUBV5A into the following led configuration:

  • soc:blue:power is added as led_power with the initial state "switched on"
  • soc:blue:power is added as led_soc_blue_power with the initial state "switched off"

With the final result of a switched off power led after boot.

The only led that needs to be added is the BTHOMEHUBV5A specific dimmed led.

Signed-off-by: Mathias Kresin <openwrt@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/lantiq/base-files/etc/board.d/01_leds

    r47755 r47850  
    2828        ucidef_set_led_usbdev "usb" "usb" "soc:blue:phone" "1-1" 
    2929        ;; 
    30 BTHOMEHUBV3A|BTHOMEHUBV5A) 
     30BTHOMEHUBV3A) 
    3131        ucidef_set_led_default "power" "power" "soc:blue:power" "1" 
    3232        ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" 
    3333        ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" 
     34        ;; 
     35BTHOMEHUBV5A) 
     36        ucidef_set_led_default "power" "power" "soc:blue:power" "1" 
     37        ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" 
     38        ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" 
     39        ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" 
    3440        ;; 
    3541VGV7510KW22) 
     
    7076esac 
    7177 
    72 for a in `ls /sys/class/leds/`; do 
    73         grep -q "\[none\]" /sys/class/leds/$a/trigger 
    74         [ $? -eq 0 ] && ucidef_set_led_default $a $a $a `cat /sys/class/leds/$a/brightness` 
    75 done 
    76  
    7778board_config_flush 
    7879 
Note: See TracChangeset for help on using the changeset viewer.