CC: kernel: upgrade to 3.18.71
[15.05/openwrt.git] / target / linux / ar7 / patches-3.18 / 925-actiontec_leds.patch
1 --- a/arch/mips/ar7/platform.c
2 +++ b/arch/mips/ar7/platform.c
3 @@ -465,31 +465,22 @@ static struct gpio_led fb_fon_leds[] = {
4         },
5  };
6  
7 -static struct gpio_led gt701_leds[] = {
8 +static struct gpio_led actiontec_leds[] = {
9         {
10                 .name                   = "inet:green",
11                 .gpio                   = 13,
12 -               .active_low             = 1,
13 -       },
14 -       {
15 -               .name                   = "usb",
16 -               .gpio                   = 12,
17 -               .active_low             = 1,
18         },
19         {
20                 .name                   = "inet:red",
21                 .gpio                   = 9,
22 -               .active_low             = 1,
23         },
24         {
25 -               .name                   = "power:red",
26 +               .name                   = "power:green",
27                 .gpio                   = 7,
28 -               .active_low             = 1,
29         },
30         {
31 -               .name                   = "power:green",
32 +               .name                   = "power:red",
33                 .gpio                   = 8,
34 -               .active_low             = 1,
35                 .default_trigger        = "default-on",
36         },
37         {
38 @@ -497,6 +488,44 @@ static struct gpio_led gt701_leds[] = {
39                 .gpio                   = 10,
40                 .active_low             = 1,
41         },
42 +       {
43 +               .name                   = "wifi",
44 +               .gpio                   = 6,
45 +               .active_low             = 1,
46 +       },
47 +       {
48 +               .name                   = "wifi:red",
49 +               .gpio                   = 3,
50 +       },
51 +       {
52 +               .name                   = "standby",
53 +               .gpio                   = 4,
54 +       },
55 +       {
56 +               .name                   = "wps",
57 +               .gpio                   = 16,
58 +               .active_low             = 1,
59 +       },
60 +       {
61 +               .name                   = "usb",
62 +               .gpio                   = 12,
63 +               .active_low             = 1,
64 +       },
65 +       {
66 +               .name                   = "voip",
67 +               .gpio                   = 15,
68 +               .active_low             = 1,
69 +        },
70 +        {
71 +                .name                  = "line1",
72 +                .gpio                  = 23,
73 +                .active_low            = 1,
74 +       },
75 +       {
76 +               .name                   = "line2",
77 +               .gpio                   = 25,
78 +               .active_low             = 1,
79 +       },
80  };
81  
82  static struct gpio_led_platform_data ar7_led_data;
83 @@ -540,9 +569,9 @@ static void __init detect_leds(void)
84         } else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
85                 ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
86                 ar7_led_data.leds = titan_leds;
87 -       } else if (strstr(prid, "GT701")) {
88 -               ar7_led_data.num_leds = ARRAY_SIZE(gt701_leds);
89 -               ar7_led_data.leds = gt701_leds;
90 +       } else if (strstr(prid, "GT7") || strstr(prid, "PK5000")) {
91 +               ar7_led_data.num_leds = ARRAY_SIZE(actiontec_leds);
92 +               ar7_led_data.leds = actiontec_leds;
93         }
94  }
95