Subject: [PATCH] MIPS: BCM47xx: Fix LEDs on WRT54GS V1.0

From: Rafał Miłecki <[email-masked]>
Date: Fri, 20 Jun 2014 07:56:40 +0200

Reported-by: Catalin Patulea <[email-masked]>
Signed-off-by: Rafał Miłecki <[email-masked]>
Acked-by: Hauke Mehrtens <[email-masked]>
Cc: [email-masked]
Cc: Hauke Mehrtens <[email-masked]>
Patchwork: https://patchwork.linux-mips.org/patch/7113/
Signed-off-by: Ralf Baechle <[email-masked]>
---
 arch/mips/bcm47xx/leds.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -311,6 +311,14 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __init
 	BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
 };
 
+/* Verified on: WRT54GS V1.0 */
+static const struct gpio_led
+bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
+	BCM47XX_GPIO_LED(0, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
+	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+	BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
+};
+
 static const struct gpio_led
 bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
 	BCM47XX_GPIO_LED(0, "unk", "usb",  1, LEDS_GPIO_DEFSTATE_OFF),
@@ -557,6 +565,8 @@ void __init bcm47xx_leds_register(void)
 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
 		break;
 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
+		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
+		break;
 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);