ramips/leds: use devicetree alias led_wlan
authorAlexander Couzens <lynxis@fe80.eu>
Tue, 2 Jul 2019 13:54:00 +0000 (15:54 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Tue, 2 Jul 2019 14:05:28 +0000 (16:05 +0200)
commitcc1147072d24eab3dfc802ceeb237fbeb584d946
tree3ce559c5cd4834d8170e4b29b8fe4911345f9832
parent7a1b575ac4ede2778bb21cfafa7a1152d9d2555f
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>
target/linux/ramips/base-files/etc/board.d/01_leds