ar71xx: keep the RouterBOARD Power LED in On state
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Fri, 14 Jul 2017 08:58:54 +0000 (11:58 +0300)
committerMathias Kresin <dev@kresin.me>
Thu, 20 Jul 2017 17:10:29 +0000 (19:10 +0200)
It is quite unexpected behaviour when the Power LED switches off as soon
as the kernel starts booting. So set the default state to 'Keep' for
the Power LEDs of all RouterBOARDs (e.g. RB91x, SXT Lite series, etc.).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
[switch the default state to keep instead of on]
Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c

index e37b73fd000cb3c756ffd5b0b8f61827dcfd225f..ba4da85530c8973ddd108f5ebfa876bc1d637a1d 100644 (file)
@@ -214,6 +214,7 @@ static struct gpio_led rb711gr100_leds[] __initdata = {
                .name           = "rb:green:power",
                .gpio           = RB91X_GPIO_LED_POWER,
                .active_low     = 0,
+               .default_state  = LEDS_GPIO_DEFSTATE_KEEP,
        },
 };
 
index 78daa3efee20cbe911c9c0c2181f9517f0f62049..62063e06a2bd5bc2ed82481d8f2683c16412fd59 100644 (file)
@@ -109,6 +109,7 @@ static struct gpio_led rbsxtlite_leds_gpio[] __initdata = {
        {
                .name           =       "rb:green:power",
                .gpio           =       SXTLITE_GPIO_LED_POWER,
+               .default_state  =       LEDS_GPIO_DEFSTATE_KEEP,
        },
 };