[OpenWrt-Devel] [PATCH] brcm47xx: add LEDs for Netgear WNR3500L
Rafał Miłecki
zajec5 at gmail.com
Sat Jul 5 19:07:24 EDT 2014
https://dev.openwrt.org/ticket/14406
Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
---
...-BCM47XX-Devices-database-update-for-3.17.patch | 28 +++++++++++++++++++++-
...-BCM47XX-Devices-database-update-for-3.17.patch | 28 +++++++++++++++++++++-
2 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
index b69a59a..047e659 100644
--- a/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
+++ b/target/linux/brcm47xx/patches-3.10/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -54,7 +54,23 @@
};
/* Motorola */
-@@ -425,6 +433,9 @@ void __init bcm47xx_leds_register(void)
+@@ -385,6 +393,15 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
+ };
+
+ static const struct gpio_led
++bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
++ BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
++ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
++};
++
++static const struct gpio_led
+ bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
+ BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+ BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
+@@ -425,6 +442,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_ASUS_RTN12:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
break;
@@ -64,3 +80,13 @@
case BCM47XX_BOARD_ASUS_RTN16:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
break;
+@@ -582,6 +602,9 @@ void __init bcm47xx_leds_register(void)
+ case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_WNR3500L:
++ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
+ break;
diff --git a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
index b69a59a..047e659 100644
--- a/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
+++ b/target/linux/brcm47xx/patches-3.14/146-MIPS-BCM47XX-Devices-database-update-for-3.17.patch
@@ -54,7 +54,23 @@
};
/* Motorola */
-@@ -425,6 +433,9 @@ void __init bcm47xx_leds_register(void)
+@@ -385,6 +393,15 @@ bcm47xx_leds_netgear_wndr4500v1[] __init
+ };
+
+ static const struct gpio_led
++bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
++ BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
++ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
++ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
++};
++
++static const struct gpio_led
+ bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
+ BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+ BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
+@@ -425,6 +442,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_ASUS_RTN12:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
break;
@@ -64,3 +80,13 @@
case BCM47XX_BOARD_ASUS_RTN16:
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
break;
+@@ -582,6 +602,9 @@ void __init bcm47xx_leds_register(void)
+ case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
+ break;
++ case BCM47XX_BOARD_NETGEAR_WNR3500L:
++ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
++ break;
+ case BCM47XX_BOARD_NETGEAR_WNR834BV2:
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
+ break;
--
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list