ar71xx: fix RouterBOARD Power LED default state
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Thu, 25 Oct 2018 22:22:37 +0000 (01:22 +0300)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:16 +0000 (17:48 +0100)
RouterBOARD(s) bootloader actully turns Power LED off just before
it starts the kernel. So we need to set the LED default status to On
instead of Keep in order to keep LED on during kernel boot.

This change fixes Power LED off during the kernel boot on the RB91x and
SXT Lite boards.

Fixes: 6cad8ee0bd ("ar71xx: keep the RouterBOARD Power LED in On state")
CC: Mathias Kresin <dev@kresin.me>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(backported from 8baad26d01dd1f7c6b30a9eadb68596ee4b4d51f)

target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c

index e240c3ad43cff9c411e42e9dde4e99105f35aa0a..9620718962624d04e338ec06d131ada4fdb60cb3 100644 (file)
@@ -219,7 +219,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,
+               .default_state  = LEDS_GPIO_DEFSTATE_ON,
        },
 };
 
index d0e6baea49e8b8f855442e1dc019a6e06b674ada..7eb0e54151b036d0e7f6ac204ca78c20a218b3af 100644 (file)
@@ -115,7 +115,7 @@ static struct gpio_led rbsxtlite_leds_gpio[] __initdata = {
        {
                .name           =       "rb:green:power",
                .gpio           =       SXTLITE_GPIO_LED_POWER,
-               .default_state  =       LEDS_GPIO_DEFSTATE_KEEP,
+               .default_state  =       LEDS_GPIO_DEFSTATE_ON,
        },
 };