ar71xx: rbspi: mark rb911L user led as active low
authorThibaut VARÈNE <hacks@slashdirt.org>
Sun, 29 Jul 2018 10:14:58 +0000 (12:14 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 30 Jul 2018 08:35:11 +0000 (10:35 +0200)
The active_low flag was missing for the user LED. This LED is open drain
(confirmed in OEM source) and open drain only makes sense for active low
GPIOs.

The two wireless LEDs mentioned in the comments are also #defined for
future reference.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Tested-by: Ryan Mounce <ryan@mounce.com.au>
target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c

index ad67c6e8690eadf52a3c6aa976ae36148234f7b6..4aff7df55b6f1ce8182bd732fce987e528cb6aeb 100644 (file)
@@ -255,6 +255,8 @@ static struct gpio_led rb952_leds[] __initdata = {
 
 
 /* RB 962UiGS-5HacT2HnT gpios */
 
 
 /* RB 962UiGS-5HacT2HnT gpios */
+#define RB962_WIFI_LED_1       1
+#define RB962_WIFI_LED_2       2
 #define RB962_GPIO_POE_STATUS  2
 #define RB962_GPIO_POE_POWER   3
 #define RB962_GPIO_LED_USER    12
 #define RB962_GPIO_POE_STATUS  2
 #define RB962_GPIO_POE_POWER   3
 #define RB962_GPIO_LED_USER    12
@@ -520,7 +522,7 @@ static struct platform_device rbwapgsc_phy_device = {
 #define RB911L_GPIO_LED_ETH    20
 #define RB911L_GPIO_LED_POWER  11
 #define RB911L_GPIO_LED_USER   3
 #define RB911L_GPIO_LED_ETH    20
 #define RB911L_GPIO_LED_POWER  11
 #define RB911L_GPIO_LED_USER   3
-#define RB911L_GPIO_PIN_HOLE   14 /* for reference */
+#define RB911L_GPIO_PIN_HOLE   14 /* for reference, active low */
 
 static struct gpio_led rb911l_leds[] __initdata = {
        {
 
 static struct gpio_led rb911l_leds[] __initdata = {
        {
@@ -551,6 +553,7 @@ static struct gpio_led rb911l_leds[] __initdata = {
                .name = "rb:green:power",
                .gpio = RB911L_GPIO_LED_POWER,
                .default_state = LEDS_GPIO_DEFSTATE_ON,
                .name = "rb:green:power",
                .gpio = RB911L_GPIO_LED_POWER,
                .default_state = LEDS_GPIO_DEFSTATE_ON,
+               .active_low = 1,
                .open_drain = 1,
        }, {
                .name = "rb:green:user",
                .open_drain = 1,
        }, {
                .name = "rb:green:user",