[LEDE-DEV] ar71xx: keep the RouterBOARD Power LED in On state

Message ID 20170714085854.6520-1-ryazanov.s.a@gmail.com
State Accepted
Delegated to: Mathias Kresin
Headers show

Commit Message

Sergey Ryazanov July 14, 2017, 8:58 a.m.
It is quite unexpected behaviour when the Power LED switches off as soon
as the kernel starts booting. So set the default state to 'On' for the
Power LEDs of all RouterBOARDs (e.g. RB91x, SXT Lite series, etc.).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c     | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c | 1 +
 2 files changed, 2 insertions(+)

Patch

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
index e37b73fd00..33038a6d93 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
@@ -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_ON,
 	},
 };
 
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
index 78daa3efee..a04c21c772 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
@@ -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_ON,
 	},
 };