aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-03-22 21:59:49 +0100
committerMathias Kresin <dev@kresin.me>2017-04-08 14:30:00 +0200
commit1f5ea4eae46e46a87353a751637ccb5d5cd5f60b (patch)
treeb3d2a1ae16ecbd743491f5665e0b9218728d74f3 /target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
parentb06559e5b76adfbafb16965098994cd30e8ded9c (diff)
downloadupstream-1f5ea4eae46e46a87353a751637ccb5d5cd5f60b.tar.gz
upstream-1f5ea4eae46e46a87353a751637ccb5d5cd5f60b.tar.bz2
upstream-1f5ea4eae46e46a87353a751637ccb5d5cd5f60b.zip
ar71xx: add correct named default wireless led by using platform leds
Instead of renaming the default wireless led attached to the wireless chip, add a new led using the platform leds with the phy0tpt trigger set in userspace. When switching ar71xx to device tree, the same can be done by using the build in GPIO controller and without adding new bindings. Drop the now unused platform code. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 4961026cbc..6c18dc6d90 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -170,12 +170,13 @@ static struct gpio_led wnr2000v3_wmac_leds_gpio[] = {
.name = "netgear:amber:test",
.gpio = WNR2000V3_GPIO_WMAC_LED_TEST_AMBER,
.active_low = 1,
+ }, {
+ .name = "netgear:blue:wlan",
+ .gpio = WNR2000V3_GPIO_WMAC_LED_WLAN_BLUE,
+ .active_low = 1,
}
};
-/* Blue WLAN LED for: WNR2000v3, WNR1000v2, WPN824N */
-static const char *wnr2000v3_wmac_led_name = "netgear:blue:wlan";
-
static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
{
.name = "netgear:green:power",
@@ -196,7 +197,13 @@ static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
}
};
-static const char *wnr612v2_wmac_led_name = "netgear:green:wlan";
+static struct gpio_led wnr612v2_wmac_leds_gpio[] __initdata = {
+ {
+ .name = "netgear:green:wlan",
+ .gpio = WNR612V2_GPIO_WMAC_LED_WLAN_GREEN,
+ .active_low = 1,
+ }
+};
static struct gpio_led wnr1000v2_leds_gpio[] __initdata = {
{
@@ -255,6 +262,10 @@ static struct gpio_led wnr1000v2_wmac_leds_gpio[] = {
.name = "netgear:green:wps",
.gpio = WNR1000V2_GPIO_WMAC_LED_WPS_GREEN,
.active_low = 1,
+ }, {
+ .name = "netgear:blue:wlan",
+ .gpio = WNR1000V2_GPIO_WMAC_LED_WLAN_BLUE,
+ .active_low = 1,
}
};
@@ -323,6 +334,10 @@ static struct gpio_led wpn824n_wmac_leds_gpio[] = {
.name = "netgear:amber:test",
.gpio = WPN824N_WGPIO_LED_TEST_AMBER,
.active_low = 1,
+ }, {
+ .name = "netgear:blue:wlan",
+ .gpio = WPN824N_WGPIO_LED_WLAN_BLUE,
+ .active_low = 1,
}
};
@@ -504,9 +519,6 @@ static void __init wnr2000v3_setup(void)
ARRAY_SIZE(wnr2000v3_keys_gpio),
wnr2000v3_keys_gpio);
- ap9x_pci_setup_wmac_led_pin(0, WNR2000V3_GPIO_WMAC_LED_WLAN_BLUE);
- ap9x_pci_setup_wmac_led_name(0, wnr2000v3_wmac_led_name);
-
ap9x_pci_setup_wmac_leds(0, wnr2000v3_wmac_leds_gpio,
ARRAY_SIZE(wnr2000v3_wmac_leds_gpio));
@@ -548,14 +560,8 @@ static void __init wnr612v2_setup(void)
ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr612v2_leds_gpio),
wnr612v2_leds_gpio);
- /*
- * This device has no buttons on AR7241 GPIO and no extra LEDs
- * connected to AR9285 so setup is simpler than for WNR2000v3.
- */
- ap9x_pci_setup_wmac_led_pin(0, WNR612V2_GPIO_WMAC_LED_WLAN_GREEN);
- ap9x_pci_setup_wmac_led_name(0, wnr612v2_wmac_led_name);
-
- ap9x_pci_setup_wmac_leds(0, NULL, 0);
+ ap9x_pci_setup_wmac_leds(0, wnr612v2_wmac_leds_gpio,
+ ARRAY_SIZE(wnr612v2_leds_gpio));
ap9x_pci_setup_wmac_btns(0, wnr612v2_wmac_keys_gpio,
ARRAY_SIZE(wnr612v2_wmac_keys_gpio),
@@ -595,9 +601,6 @@ static void __init wnr1000v2_setup(void)
ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr1000v2_leds_gpio),
wnr1000v2_leds_gpio);
- ap9x_pci_setup_wmac_led_pin(0, WNR1000V2_GPIO_WMAC_LED_WLAN_BLUE);
- ap9x_pci_setup_wmac_led_name(0, wnr2000v3_wmac_led_name);
-
ap9x_pci_setup_wmac_leds(0, wnr1000v2_wmac_leds_gpio,
ARRAY_SIZE(wnr1000v2_wmac_leds_gpio));
@@ -624,8 +627,6 @@ static void __init wpn824n_setup(void)
ath79_register_leds_gpio(-1, ARRAY_SIZE(wpn824n_leds_gpio),
wpn824n_leds_gpio);
- ap9x_pci_setup_wmac_led_pin(0, WPN824N_WGPIO_LED_WLAN_BLUE);
- ap9x_pci_setup_wmac_led_name(0, wnr2000v3_wmac_led_name);
ap9x_pci_setup_wmac_leds(0, wpn824n_wmac_leds_gpio,
ARRAY_SIZE(wpn824n_wmac_leds_gpio));
ap9x_pci_setup_wmac_btns(0, wpn824n_wmac_keys_gpio,