diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2014-01-02 06:32:57 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-24 16:39:51 -0500 |
commit | 2d0816dcb7edee71760e94ab1f47c4655610e43c (patch) | |
tree | 1d071a29251229a4c1ce5b9ede17dbe8d9f7747b /arch/mips/bcm47xx | |
parent | 3be972556fa14b5bffec0ff076a8f82dbe799f8e (diff) |
MIPS: BCM47XX: Import LEDs database from OpenWrt
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6298/
Diffstat (limited to 'arch/mips/bcm47xx')
-rw-r--r-- | arch/mips/bcm47xx/leds.c | 494 |
1 files changed, 494 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c index 6a49d4c6c9c3..cc141c1e668f 100644 --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c | |||
@@ -3,6 +3,334 @@ | |||
3 | #include <linux/leds.h> | 3 | #include <linux/leds.h> |
4 | #include <bcm47xx_board.h> | 4 | #include <bcm47xx_board.h> |
5 | 5 | ||
6 | /************************************************** | ||
7 | * Database | ||
8 | **************************************************/ | ||
9 | |||
10 | #define BCM47XX_GPIO_LED(_gpio, _color, _function, _active_low, \ | ||
11 | _default_state) \ | ||
12 | { \ | ||
13 | .name = "bcm47xx:" _color ":" _function, \ | ||
14 | .gpio = _gpio, \ | ||
15 | .active_low = _active_low, \ | ||
16 | .default_state = _default_state, \ | ||
17 | } | ||
18 | |||
19 | /* Asus */ | ||
20 | |||
21 | static const struct gpio_led | ||
22 | bcm47xx_leds_asus_rtn12[] __initconst = { | ||
23 | BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
24 | BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
25 | }; | ||
26 | |||
27 | static const struct gpio_led | ||
28 | bcm47xx_leds_asus_rtn16[] __initconst = { | ||
29 | BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
30 | BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
31 | }; | ||
32 | |||
33 | static const struct gpio_led | ||
34 | bcm47xx_leds_asus_rtn66u[] __initconst = { | ||
35 | BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
36 | BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
37 | }; | ||
38 | |||
39 | static const struct gpio_led | ||
40 | bcm47xx_leds_asus_wl300g[] __initconst = { | ||
41 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
42 | }; | ||
43 | |||
44 | static const struct gpio_led | ||
45 | bcm47xx_leds_asus_wl320ge[] __initconst = { | ||
46 | BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
47 | BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
48 | BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
49 | }; | ||
50 | |||
51 | static const struct gpio_led | ||
52 | bcm47xx_leds_asus_wl330ge[] __initconst = { | ||
53 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
54 | }; | ||
55 | |||
56 | static const struct gpio_led | ||
57 | bcm47xx_leds_asus_wl500gd[] __initconst = { | ||
58 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
59 | }; | ||
60 | |||
61 | static const struct gpio_led | ||
62 | bcm47xx_leds_asus_wl500gpv1[] __initconst = { | ||
63 | BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
64 | }; | ||
65 | |||
66 | static const struct gpio_led | ||
67 | bcm47xx_leds_asus_wl500gpv2[] __initconst = { | ||
68 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
69 | BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
70 | }; | ||
71 | |||
72 | static const struct gpio_led | ||
73 | bcm47xx_leds_asus_wl500w[] __initconst = { | ||
74 | BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
75 | }; | ||
76 | |||
77 | static const struct gpio_led | ||
78 | bcm47xx_leds_asus_wl520gc[] __initconst = { | ||
79 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
80 | BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
81 | }; | ||
82 | |||
83 | static const struct gpio_led | ||
84 | bcm47xx_leds_asus_wl520gu[] __initconst = { | ||
85 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
86 | BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
87 | }; | ||
88 | |||
89 | static const struct gpio_led | ||
90 | bcm47xx_leds_asus_wl700ge[] __initconst = { | ||
91 | BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */ | ||
92 | }; | ||
93 | |||
94 | static const struct gpio_led | ||
95 | bcm47xx_leds_asus_wlhdd[] __initconst = { | ||
96 | BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
97 | BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
98 | }; | ||
99 | |||
100 | /* Belkin */ | ||
101 | |||
102 | static const struct gpio_led | ||
103 | bcm47xx_leds_belkin_f7d4301[] __initconst = { | ||
104 | BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
105 | BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
106 | BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
107 | BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
108 | BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
109 | BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
110 | }; | ||
111 | |||
112 | /* Buffalo */ | ||
113 | |||
114 | static const struct gpio_led | ||
115 | bcm47xx_leds_buffalo_whr2_a54g54[] __initconst = { | ||
116 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
117 | }; | ||
118 | |||
119 | static const struct gpio_led | ||
120 | bcm47xx_leds_buffalo_whr_g125[] __initconst = { | ||
121 | BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
122 | BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
123 | BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
124 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
125 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
126 | }; | ||
127 | |||
128 | static const struct gpio_led | ||
129 | bcm47xx_leds_buffalo_whr_g54s[] __initconst = { | ||
130 | BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
131 | BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
132 | BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
133 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
134 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
135 | }; | ||
136 | |||
137 | static const struct gpio_led | ||
138 | bcm47xx_leds_buffalo_whr_hp_g54[] __initconst = { | ||
139 | BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
140 | BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
141 | BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
142 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
143 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
144 | }; | ||
145 | |||
146 | static const struct gpio_led | ||
147 | bcm47xx_leds_buffalo_wzr_g300n[] __initconst = { | ||
148 | BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
149 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
150 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
151 | }; | ||
152 | |||
153 | static const struct gpio_led | ||
154 | bcm47xx_leds_buffalo_wzr_rs_g54[] __initconst = { | ||
155 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
156 | BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
157 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
158 | }; | ||
159 | |||
160 | static const struct gpio_led | ||
161 | bcm47xx_leds_buffalo_wzr_rs_g54hp[] __initconst = { | ||
162 | BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
163 | BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
164 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
165 | }; | ||
166 | |||
167 | /* Dell */ | ||
168 | |||
169 | static const struct gpio_led | ||
170 | bcm47xx_leds_dell_tm2300[] __initconst = { | ||
171 | BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
172 | BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
173 | }; | ||
174 | |||
175 | /* D-Link */ | ||
176 | |||
177 | static const struct gpio_led | ||
178 | bcm47xx_leds_dlink_dir130[] __initconst = { | ||
179 | BCM47XX_GPIO_LED(0, "green", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* Originally blinking when device is ready, separated from "power" LED */ | ||
180 | BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
181 | }; | ||
182 | |||
183 | static const struct gpio_led | ||
184 | bcm47xx_leds_dlink_dir330[] __initconst = { | ||
185 | BCM47XX_GPIO_LED(0, "green", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* Originally blinking when device is ready, separated from "power" LED */ | ||
186 | BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
187 | BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
188 | }; | ||
189 | |||
190 | /* Huawei */ | ||
191 | |||
192 | static const struct gpio_led | ||
193 | bcm47xx_leds_huawei_e970[] __initconst = { | ||
194 | BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
195 | }; | ||
196 | |||
197 | /* Linksys */ | ||
198 | |||
199 | static const struct gpio_led | ||
200 | bcm47xx_leds_linksys_e1000v1[] __initconst = { | ||
201 | BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
202 | BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
203 | BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
204 | BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
205 | }; | ||
206 | |||
207 | static const struct gpio_led | ||
208 | bcm47xx_leds_linksys_e1000v21[] __initconst = { | ||
209 | BCM47XX_GPIO_LED(5, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
210 | BCM47XX_GPIO_LED(6, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
211 | BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
212 | BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
213 | }; | ||
214 | |||
215 | static const struct gpio_led | ||
216 | bcm47xx_leds_linksys_e2000v1[] __initconst = { | ||
217 | BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
218 | BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
219 | BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
220 | BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
221 | }; | ||
222 | |||
223 | static const struct gpio_led | ||
224 | bcm47xx_leds_linksys_e3000v1[] __initconst = { | ||
225 | BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
226 | BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
227 | BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
228 | BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
229 | BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
230 | }; | ||
231 | |||
232 | static const struct gpio_led | ||
233 | bcm47xx_leds_linksys_e3200v1[] __initconst = { | ||
234 | BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
235 | }; | ||
236 | |||
237 | static const struct gpio_led | ||
238 | bcm47xx_leds_linksys_e4200v1[] __initconst = { | ||
239 | BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON), | ||
240 | }; | ||
241 | |||
242 | static const struct gpio_led | ||
243 | bcm47xx_leds_linksys_wrt150nv1[] __initconst = { | ||
244 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
245 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
246 | BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
247 | }; | ||
248 | |||
249 | static const struct gpio_led | ||
250 | bcm47xx_leds_linksys_wrt150nv11[] __initconst = { | ||
251 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
252 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
253 | BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
254 | }; | ||
255 | |||
256 | static const struct gpio_led | ||
257 | bcm47xx_leds_linksys_wrt160nv1[] __initconst = { | ||
258 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
259 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
260 | BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
261 | }; | ||
262 | |||
263 | static const struct gpio_led | ||
264 | bcm47xx_leds_linksys_wrt160nv3[] __initconst = { | ||
265 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
266 | BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
267 | BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
268 | }; | ||
269 | |||
270 | static const struct gpio_led | ||
271 | bcm47xx_leds_linksys_wrt300nv11[] __initconst = { | ||
272 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
273 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
274 | BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
275 | }; | ||
276 | |||
277 | static const struct gpio_led | ||
278 | bcm47xx_leds_linksys_wrt310nv1[] __initconst = { | ||
279 | BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
280 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
281 | BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
282 | }; | ||
283 | |||
284 | static const struct gpio_led | ||
285 | bcm47xx_leds_linksys_wrt610nv1[] __initconst = { | ||
286 | BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
287 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
288 | BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
289 | BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
290 | }; | ||
291 | |||
292 | static const struct gpio_led | ||
293 | bcm47xx_leds_linksys_wrt610nv2[] __initconst = { | ||
294 | BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
295 | BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
296 | BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
297 | BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
298 | BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
299 | }; | ||
300 | |||
301 | /* Motorola */ | ||
302 | |||
303 | static const struct gpio_led | ||
304 | bcm47xx_leds_motorola_we800g[] __initconst = { | ||
305 | BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
306 | BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */ | ||
307 | BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
308 | }; | ||
309 | |||
310 | static const struct gpio_led | ||
311 | bcm47xx_leds_motorola_wr850gp[] __initconst = { | ||
312 | BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
313 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
314 | BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
315 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
316 | }; | ||
317 | |||
318 | static const struct gpio_led | ||
319 | bcm47xx_leds_motorola_wr850gv2v3[] __initconst = { | ||
320 | BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
321 | BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
322 | BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
323 | }; | ||
324 | |||
325 | /* Netgear */ | ||
326 | |||
327 | static const struct gpio_led | ||
328 | bcm47xx_leds_netgear_wndr3400v1[] __initconst = { | ||
329 | BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF), | ||
330 | BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
331 | BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
332 | }; | ||
333 | |||
6 | static const struct gpio_led | 334 | static const struct gpio_led |
7 | bcm47xx_leds_netgear_wndr4500_v1_leds[] __initconst = { | 335 | bcm47xx_leds_netgear_wndr4500_v1_leds[] __initconst = { |
8 | { | 336 | { |
@@ -49,6 +377,24 @@ bcm47xx_leds_netgear_wndr4500_v1_leds[] __initconst = { | |||
49 | }, | 377 | }, |
50 | }; | 378 | }; |
51 | 379 | ||
380 | static const struct gpio_led | ||
381 | bcm47xx_leds_netgear_wnr834bv2[] __initconst = { | ||
382 | BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON), | ||
383 | BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
384 | BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF), | ||
385 | }; | ||
386 | |||
387 | /* SimpleTech */ | ||
388 | |||
389 | static const struct gpio_led | ||
390 | bcm47xx_leds_simpletech_simpleshare[] __initconst = { | ||
391 | BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */ | ||
392 | }; | ||
393 | |||
394 | /************************************************** | ||
395 | * Init | ||
396 | **************************************************/ | ||
397 | |||
52 | static struct gpio_led_platform_data bcm47xx_leds_pdata; | 398 | static struct gpio_led_platform_data bcm47xx_leds_pdata; |
53 | 399 | ||
54 | #define bcm47xx_set_pdata(dev_leds) do { \ | 400 | #define bcm47xx_set_pdata(dev_leds) do { \ |
@@ -61,9 +407,157 @@ void __init bcm47xx_leds_register(void) | |||
61 | enum bcm47xx_board board = bcm47xx_board_get(); | 407 | enum bcm47xx_board board = bcm47xx_board_get(); |
62 | 408 | ||
63 | switch (board) { | 409 | switch (board) { |
410 | case BCM47XX_BOARD_ASUS_RTN12: | ||
411 | bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12); | ||
412 | break; | ||
413 | case BCM47XX_BOARD_ASUS_RTN16: | ||
414 | bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16); | ||
415 | break; | ||
416 | case BCM47XX_BOARD_ASUS_RTN66U: | ||
417 | bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u); | ||
418 | break; | ||
419 | case BCM47XX_BOARD_ASUS_WL300G: | ||
420 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g); | ||
421 | break; | ||
422 | case BCM47XX_BOARD_ASUS_WL320GE: | ||
423 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge); | ||
424 | break; | ||
425 | case BCM47XX_BOARD_ASUS_WL330GE: | ||
426 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge); | ||
427 | break; | ||
428 | case BCM47XX_BOARD_ASUS_WL500GD: | ||
429 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd); | ||
430 | break; | ||
431 | case BCM47XX_BOARD_ASUS_WL500GPV1: | ||
432 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1); | ||
433 | break; | ||
434 | case BCM47XX_BOARD_ASUS_WL500GPV2: | ||
435 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2); | ||
436 | break; | ||
437 | case BCM47XX_BOARD_ASUS_WL500W: | ||
438 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w); | ||
439 | break; | ||
440 | case BCM47XX_BOARD_ASUS_WL520GC: | ||
441 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc); | ||
442 | break; | ||
443 | case BCM47XX_BOARD_ASUS_WL520GU: | ||
444 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu); | ||
445 | break; | ||
446 | case BCM47XX_BOARD_ASUS_WL700GE: | ||
447 | bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge); | ||
448 | break; | ||
449 | case BCM47XX_BOARD_ASUS_WLHDD: | ||
450 | bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd); | ||
451 | break; | ||
452 | |||
453 | case BCM47XX_BOARD_BELKIN_F7D4301: | ||
454 | bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301); | ||
455 | break; | ||
456 | |||
457 | case BCM47XX_BOARD_BUFFALO_WHR2_A54G54: | ||
458 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54); | ||
459 | break; | ||
460 | case BCM47XX_BOARD_BUFFALO_WHR_G125: | ||
461 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125); | ||
462 | break; | ||
463 | case BCM47XX_BOARD_BUFFALO_WHR_G54S: | ||
464 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s); | ||
465 | break; | ||
466 | case BCM47XX_BOARD_BUFFALO_WHR_HP_G54: | ||
467 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54); | ||
468 | break; | ||
469 | case BCM47XX_BOARD_BUFFALO_WZR_G300N: | ||
470 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n); | ||
471 | break; | ||
472 | case BCM47XX_BOARD_BUFFALO_WZR_RS_G54: | ||
473 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54); | ||
474 | break; | ||
475 | case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP: | ||
476 | bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp); | ||
477 | break; | ||
478 | |||
479 | case BCM47XX_BOARD_DELL_TM2300: | ||
480 | bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300); | ||
481 | break; | ||
482 | |||
483 | case BCM47XX_BOARD_DLINK_DIR130: | ||
484 | bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130); | ||
485 | break; | ||
486 | case BCM47XX_BOARD_DLINK_DIR330: | ||
487 | bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); | ||
488 | break; | ||
489 | |||
490 | case BCM47XX_BOARD_HUAWEI_E970: | ||
491 | bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); | ||
492 | break; | ||
493 | |||
494 | case BCM47XX_BOARD_LINKSYS_E1000V1: | ||
495 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1); | ||
496 | break; | ||
497 | case BCM47XX_BOARD_LINKSYS_E1000V21: | ||
498 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21); | ||
499 | break; | ||
500 | case BCM47XX_BOARD_LINKSYS_E2000V1: | ||
501 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1); | ||
502 | break; | ||
503 | case BCM47XX_BOARD_LINKSYS_E3000V1: | ||
504 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1); | ||
505 | break; | ||
506 | case BCM47XX_BOARD_LINKSYS_E3200V1: | ||
507 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1); | ||
508 | break; | ||
509 | case BCM47XX_BOARD_LINKSYS_E4200V1: | ||
510 | bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1); | ||
511 | break; | ||
512 | case BCM47XX_BOARD_LINKSYS_WRT150NV1: | ||
513 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1); | ||
514 | break; | ||
515 | case BCM47XX_BOARD_LINKSYS_WRT150NV11: | ||
516 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11); | ||
517 | break; | ||
518 | case BCM47XX_BOARD_LINKSYS_WRT160NV1: | ||
519 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1); | ||
520 | break; | ||
521 | case BCM47XX_BOARD_LINKSYS_WRT160NV3: | ||
522 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3); | ||
523 | break; | ||
524 | case BCM47XX_BOARD_LINKSYS_WRT300NV11: | ||
525 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11); | ||
526 | break; | ||
527 | case BCM47XX_BOARD_LINKSYS_WRT310NV1: | ||
528 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1); | ||
529 | break; | ||
530 | case BCM47XX_BOARD_LINKSYS_WRT610NV1: | ||
531 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1); | ||
532 | break; | ||
533 | case BCM47XX_BOARD_LINKSYS_WRT610NV2: | ||
534 | bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2); | ||
535 | break; | ||
536 | |||
537 | case BCM47XX_BOARD_MOTOROLA_WE800G: | ||
538 | bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g); | ||
539 | break; | ||
540 | case BCM47XX_BOARD_MOTOROLA_WR850GP: | ||
541 | bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp); | ||
542 | break; | ||
543 | case BCM47XX_BOARD_MOTOROLA_WR850GV2V3: | ||
544 | bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3); | ||
545 | break; | ||
546 | |||
547 | case BCM47XX_BOARD_NETGEAR_WNDR3400V1: | ||
548 | bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1); | ||
549 | break; | ||
64 | case BCM47XX_BOARD_NETGEAR_WNDR4500V1: | 550 | case BCM47XX_BOARD_NETGEAR_WNDR4500V1: |
65 | bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500_v1_leds); | 551 | bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500_v1_leds); |
66 | break; | 552 | break; |
553 | case BCM47XX_BOARD_NETGEAR_WNR834BV2: | ||
554 | bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2); | ||
555 | break; | ||
556 | |||
557 | case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE: | ||
558 | bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare); | ||
559 | break; | ||
560 | |||
67 | default: | 561 | default: |
68 | pr_debug("No LEDs configuration found for this device\n"); | 562 | pr_debug("No LEDs configuration found for this device\n"); |
69 | return; | 563 | return; |