aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-12-16 13:21:31 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-12-16 13:21:31 +0000
commita6aa2a2d9c9ed97f79a86a73c04df9171960db8e (patch)
treeaa91beea78a81c04c3a565c0313a6a6cb2b16d04 /target/linux/ar7/files
parentddf298aabb6344348b859f9579eb29716120f67d (diff)
downloadmaster-187ad058-a6aa2a2d9c9ed97f79a86a73c04df9171960db8e.tar.gz
master-187ad058-a6aa2a2d9c9ed97f79a86a73c04df9171960db8e.tar.bz2
master-187ad058-a6aa2a2d9c9ed97f79a86a73c04df9171960db8e.zip
Add LEDs definitions for the D-Link DSL-502T (#2746)
Signed-off-by: Oliver <oliver@opencloud.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9776 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7/files')
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/platform.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/target/linux/ar7/files/arch/mips/ar7/platform.c b/target/linux/ar7/files/arch/mips/ar7/platform.c
index c1cd5f97b9..9be9f0971b 100644
--- a/target/linux/ar7/files/arch/mips/ar7/platform.c
+++ b/target/linux/ar7/files/arch/mips/ar7/platform.c
@@ -323,6 +323,12 @@ static struct gpio_led default_leds[] = {
{ .name = "status", .gpio = 8, .active_low = 1, },
};
+static struct gpio_led dsl502t_leds[] = {
+ { .name = "status", .gpio = 9, .active_low = 1, },
+ { .name = "ethernet", .gpio = 7, .active_low = 1, },
+ { .name = "usb", .gpio = 12, .active_low = 1, },
+};
+
static struct gpio_led fb_sl_leds[] = {
{ .name = "1", .gpio = 7, },
{ .name = "2", .gpio = 13, .active_low = 1, },
@@ -392,7 +398,7 @@ static void cpmac_get_mac(int instance, unsigned char *dev_addr)
static void __init detect_leds(void)
{
- char *prId;
+ char *prId, *usb_prod;
/* Default LEDs */
ar7_led_data.num_leds = ARRAY_SIZE(default_leds);
@@ -400,6 +406,7 @@ static void __init detect_leds(void)
/* FIXME: the whole thing is unreliable */
prId = prom_getenv("ProductID");
+ usb_prod = prom_getenv("usb_prod");
/* If we can't get the product id from PROM, use the default LEDs */
if (!prId)
@@ -411,6 +418,9 @@ static void __init detect_leds(void)
} else if (strstr(prId, "Fritz_Box_")) {
ar7_led_data.num_leds = ARRAY_SIZE(fb_sl_leds);
ar7_led_data.leds = fb_sl_leds;
+ } else if (!strcmp(prId, "AR7RD") && usb_prod != NULL && strstr(usb_prod, "DSL-502T")) {
+ ar7_led_data.num_leds = ARRAY_SIZE(dsl502t_leds);
+ ar7_led_data.leds = dsl502t_leds;
}
}