Root/target/linux/ar7/patches-2.6.37/999-gt701_leds.patch

1--- a/arch/mips/ar7/platform.c
2+++ b/arch/mips/ar7/platform.c
3@@ -455,6 +455,40 @@ static struct gpio_led fb_fon_leds[] = {
4     },
5 };
6 
7+static struct gpio_led gt701_leds[] = {
8+ {
9+ .name = "inetgreen",
10+ .gpio = 13,
11+ .active_low = 1,
12+ },
13+ {
14+ .name = "usb",
15+ .gpio = 12,
16+ .active_low = 1,
17+ },
18+ {
19+ .name = "inetred",
20+ .gpio = 9,
21+ .active_low = 1,
22+ },
23+ {
24+ .name = "powerred",
25+ .gpio = 7,
26+ .active_low = 1,
27+ },
28+ {
29+ .name = "powergreen",
30+ .gpio = 8,
31+ .active_low = 1,
32+ .default_trigger = "default-on",
33+ },
34+ {
35+ .name = "ethernet",
36+ .gpio = 10,
37+ .active_low = 1,
38+ },
39+};
40+
41 static struct gpio_led_platform_data ar7_led_data;
42 
43 static struct platform_device ar7_gpio_leds = {
44@@ -496,6 +530,9 @@ static void __init detect_leds(void)
45     } else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
46         ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
47         ar7_led_data.leds = titan_leds;
48+ } else if (strstr(prid, "GT701")) {
49+ ar7_led_data.num_leds = ARRAY_SIZE(gt701_leds);
50+ ar7_led_data.leds = gt701_leds;
51     }
52 }
53 
54

Archive Download this file



interactive