mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
ramips/leds: use devicetree alias led_wlan
Similiar to the lantiq target use a dts alias to define the wlan led instead of static mapping in /etc/board.d/01_leds. Reduce code duplication. A device tree must define the alias "led-wlan" similiar to "led-boot". / { aliases { led-wlan = &led_wlan; }; [..] led_wlan: wlan { label = "tl-wr841n-v14:green:wlan"; gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; }; Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
parent
7a1b575ac4
commit
cc1147072d
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
set_wifi_led() {
|
||||
@ -12,6 +13,9 @@ boardname="${board##*,}"
|
||||
|
||||
board_config_update
|
||||
|
||||
led_wlan="$(get_dt_led wlan)"
|
||||
[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt"
|
||||
|
||||
case $board in
|
||||
3g-6200n|\
|
||||
br-6475nd|\
|
||||
|
Loading…
Reference in New Issue
Block a user