xref: /linux/arch/mips/bcm47xx/leds.c (revision c358f53871605a1a8d7ed6e544a05ea00e9c80cb)
1 // SPDX-License-Identifier: GPL-2.0
2 #include "bcm47xx_private.h"
3 
4 #include <linux/leds.h>
5 #include <bcm47xx_board.h>
6 
7 /**************************************************
8  * Database
9  **************************************************/
10 
11 #define BCM47XX_GPIO_LED(_gpio, _color, _function, _active_low,		\
12 			 _default_state)				\
13 	{								\
14 		.name		= "bcm47xx:" _color ":" _function,	\
15 		.gpio		= _gpio,				\
16 		.active_low	= _active_low,				\
17 		.default_state	= _default_state,			\
18 	}
19 
20 #define BCM47XX_GPIO_LED_TRIGGER(_gpio, _color, _function, _active_low,	\
21 				 _default_trigger)			\
22 	{								\
23 		.name		= "bcm47xx:" _color ":" _function,	\
24 		.gpio		= _gpio,				\
25 		.active_low	= _active_low,				\
26 		.default_state	= LEDS_GPIO_DEFSTATE_OFF,		\
27 		.default_trigger	= _default_trigger,		\
28 	}
29 
30 /* Asus */
31 
32 static const struct gpio_led
33 bcm47xx_leds_asus_rtn10u[] __initconst = {
34 	BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
35 	BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
36 	BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
37 	BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
38 };
39 
40 static const struct gpio_led
41 bcm47xx_leds_asus_rtn12[] __initconst = {
42 	BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
43 	BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
44 };
45 
46 static const struct gpio_led
47 bcm47xx_leds_asus_rtn15u[] __initconst = {
48 	/* TODO: Add "wlan" LED */
49 	BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
50 	BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF),
51 	BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
52 	BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
53 };
54 
55 static const struct gpio_led
56 bcm47xx_leds_asus_rtn16[] __initconst = {
57 	BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
58 	BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
59 };
60 
61 static const struct gpio_led
62 bcm47xx_leds_asus_rtn66u[] __initconst = {
63 	BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
64 	BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
65 };
66 
67 static const struct gpio_led
68 bcm47xx_leds_asus_wl300g[] __initconst = {
69 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
70 };
71 
72 static const struct gpio_led
73 bcm47xx_leds_asus_wl320ge[] __initconst = {
74 	BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
75 	BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
76 	BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
77 };
78 
79 static const struct gpio_led
80 bcm47xx_leds_asus_wl330ge[] __initconst = {
81 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
82 };
83 
84 static const struct gpio_led
85 bcm47xx_leds_asus_wl500g[] __initconst = {
86 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
87 };
88 
89 static const struct gpio_led
90 bcm47xx_leds_asus_wl500gd[] __initconst = {
91 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
92 };
93 
94 static const struct gpio_led
95 bcm47xx_leds_asus_wl500gpv1[] __initconst = {
96 	BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
97 };
98 
99 static const struct gpio_led
100 bcm47xx_leds_asus_wl500gpv2[] __initconst = {
101 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
102 	BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
103 };
104 
105 static const struct gpio_led
106 bcm47xx_leds_asus_wl500w[] __initconst = {
107 	BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
108 };
109 
110 static const struct gpio_led
111 bcm47xx_leds_asus_wl520gc[] __initconst = {
112 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
113 	BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
114 };
115 
116 static const struct gpio_led
117 bcm47xx_leds_asus_wl520gu[] __initconst = {
118 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
119 	BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
120 };
121 
122 static const struct gpio_led
123 bcm47xx_leds_asus_wl700ge[] __initconst = {
124 	BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */
125 };
126 
127 static const struct gpio_led
128 bcm47xx_leds_asus_wlhdd[] __initconst = {
129 	BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
130 	BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
131 };
132 
133 /* Belkin */
134 
135 static const struct gpio_led
136 bcm47xx_leds_belkin_f7d4301[] __initconst = {
137 	BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
138 	BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
139 	BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
140 	BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
141 	BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF),
142 	BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
143 };
144 
145 /* Buffalo */
146 
147 static const struct gpio_led
148 bcm47xx_leds_buffalo_whr2_a54g54[] __initconst = {
149 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
150 };
151 
152 static const struct gpio_led
153 bcm47xx_leds_buffalo_whr_g125[] __initconst = {
154 	BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
155 	BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
156 	BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF),
157 	BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
158 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
159 };
160 
161 static const struct gpio_led
162 bcm47xx_leds_buffalo_whr_g54s[] __initconst = {
163 	BCM47XX_GPIO_LED(1, "green", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
164 	BCM47XX_GPIO_LED(2, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
165 	BCM47XX_GPIO_LED(3, "green", "internal", 1, LEDS_GPIO_DEFSTATE_OFF),
166 	BCM47XX_GPIO_LED(6, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
167 	BCM47XX_GPIO_LED(7, "red", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
168 };
169 
170 static const struct gpio_led
171 bcm47xx_leds_buffalo_whr_hp_g54[] __initconst = {
172 	BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
173 	BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
174 	BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF),
175 	BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
176 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
177 };
178 
179 static const struct gpio_led
180 bcm47xx_leds_buffalo_wzr_g300n[] __initconst = {
181 	BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
182 	BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
183 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
184 };
185 
186 static const struct gpio_led
187 bcm47xx_leds_buffalo_wzr_rs_g54[] __initconst = {
188 	BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
189 	BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF),
190 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
191 };
192 
193 static const struct gpio_led
194 bcm47xx_leds_buffalo_wzr_rs_g54hp[] __initconst = {
195 	BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
196 	BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF),
197 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
198 };
199 
200 /* Dell */
201 
202 static const struct gpio_led
203 bcm47xx_leds_dell_tm2300[] __initconst = {
204 	BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
205 	BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
206 };
207 
208 /* D-Link */
209 
210 static const struct gpio_led
211 bcm47xx_leds_dlink_dir130[] __initconst = {
212 	BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
213 	BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
214 };
215 
216 static const struct gpio_led
217 bcm47xx_leds_dlink_dir330[] __initconst = {
218 	BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
219 	BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
220 	BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
221 };
222 
223 /* Huawei */
224 
225 static const struct gpio_led
226 bcm47xx_leds_huawei_e970[] __initconst = {
227 	BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
228 };
229 
230 /* Linksys */
231 
232 static const struct gpio_led
233 bcm47xx_leds_linksys_e1000v1[] __initconst = {
234 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
235 	BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
236 	BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
237 	BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
238 };
239 
240 static const struct gpio_led
241 bcm47xx_leds_linksys_e1000v21[] __initconst = {
242 	BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
243 	BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
244 	BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
245 	BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
246 };
247 
248 static const struct gpio_led
249 bcm47xx_leds_linksys_e2000v1[] __initconst = {
250 	BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
251 	BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
252 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
253 	BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
254 };
255 
256 static const struct gpio_led
257 bcm47xx_leds_linksys_e3000v1[] __initconst = {
258 	BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
259 	BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
260 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
261 	BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
262 	BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
263 };
264 
265 static const struct gpio_led
266 bcm47xx_leds_linksys_e3200v1[] __initconst = {
267 	BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
268 };
269 
270 static const struct gpio_led
271 bcm47xx_leds_linksys_e4200v1[] __initconst = {
272 	BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON),
273 };
274 
275 static const struct gpio_led
276 bcm47xx_leds_linksys_wrt150nv1[] __initconst = {
277 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
278 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
279 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
280 };
281 
282 static const struct gpio_led
283 bcm47xx_leds_linksys_wrt150nv11[] __initconst = {
284 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
285 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
286 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
287 };
288 
289 static const struct gpio_led
290 bcm47xx_leds_linksys_wrt160nv1[] __initconst = {
291 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
292 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
293 	BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
294 };
295 
296 static const struct gpio_led
297 bcm47xx_leds_linksys_wrt160nv3[] __initconst = {
298 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
299 	BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
300 	BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
301 };
302 
303 static const struct gpio_led
304 bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
305 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
306 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
307 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
308 };
309 
310 static const struct gpio_led
311 bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
312 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
313 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
314 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
315 };
316 
317 static const struct gpio_led
318 bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
319 	BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
320 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
321 	BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
322 };
323 
324 static const struct gpio_led
325 bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
326 	BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
327 	BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
328 	BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
329 };
330 
331 static const struct gpio_led
332 bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
333 	BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
334 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
335 	BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
336 	BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
337 };
338 
339 static const struct gpio_led
340 bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
341 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
342 	BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
343 	BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
344 };
345 
346 /* Verified on: WRT54GS V1.0 */
347 static const struct gpio_led
348 bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
349 	BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
350 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
351 	BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
352 };
353 
354 /* Verified on: WRT54GL V1.1 */
355 static const struct gpio_led
356 bcm47xx_leds_linksys_wrt54g_type_0467[] __initconst = {
357 	BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
358 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
359 	BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
360 	BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
361 	BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
362 };
363 
364 static const struct gpio_led
365 bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
366 	BCM47XX_GPIO_LED(0, "unk", "usb",  1, LEDS_GPIO_DEFSTATE_OFF),
367 	BCM47XX_GPIO_LED(1, "unk", "power",  0, LEDS_GPIO_DEFSTATE_OFF),
368 	BCM47XX_GPIO_LED(3, "amber", "wps",  1, LEDS_GPIO_DEFSTATE_OFF),
369 	BCM47XX_GPIO_LED(9, "blue", "wps",  1, LEDS_GPIO_DEFSTATE_OFF),
370 };
371 
372 static const struct gpio_led
373 bcm47xx_leds_linksys_wrt610nv2[] __initconst = {
374 	BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
375 	BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
376 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
377 	BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
378 	BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
379 };
380 
381 static const struct gpio_led
382 bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
383 	BCM47XX_GPIO_LED(0, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
384 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
385 	BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
386 	BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
387 };
388 
389 /* Luxul */
390 
391 static const struct gpio_led
392 bcm47xx_leds_luxul_abr_4400_v1[] __initconst = {
393 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
394 	BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
395 };
396 
397 static const struct gpio_led
398 bcm47xx_leds_luxul_xap_310_v1[] __initconst = {
399 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
400 };
401 
402 static const struct gpio_led
403 bcm47xx_leds_luxul_xap_1210_v1[] __initconst = {
404 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
405 };
406 
407 static const struct gpio_led
408 bcm47xx_leds_luxul_xap_1230_v1[] __initconst = {
409 	BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
410 	BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
411 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
412 };
413 
414 static const struct gpio_led
415 bcm47xx_leds_luxul_xap_1240_v1[] __initconst = {
416 	BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
417 	BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
418 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
419 };
420 
421 static const struct gpio_led
422 bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
423 	BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
424 };
425 
426 static const struct gpio_led
427 bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = {
428 	BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
429 	BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
430 };
431 
432 static const struct gpio_led
433 bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
434 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
435 	BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
436 };
437 
438 static const struct gpio_led
439 bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = {
440 	BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"),
441 	BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
442 };
443 
444 static const struct gpio_led
445 bcm47xx_leds_luxul_xwr_600_v1[] __initconst = {
446 	BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
447 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
448 	BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
449 };
450 
451 static const struct gpio_led
452 bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
453 	BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
454 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
455 	BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"),
456 	BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
457 };
458 
459 static const struct gpio_led
460 bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
461 	BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
462 };
463 
464 /* Microsoft */
465 
466 static const struct gpio_led
467 bcm47xx_leds_microsoft_nm700[] __initconst = {
468 	BCM47XX_GPIO_LED(6, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
469 };
470 
471 /* Motorola */
472 
473 static const struct gpio_led
474 bcm47xx_leds_motorola_we800g[] __initconst = {
475 	BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
476 	BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */
477 	BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
478 };
479 
480 static const struct gpio_led
481 bcm47xx_leds_motorola_wr850gp[] __initconst = {
482 	BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
483 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
484 	BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
485 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
486 };
487 
488 static const struct gpio_led
489 bcm47xx_leds_motorola_wr850gv2v3[] __initconst = {
490 	BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
491 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
492 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
493 };
494 
495 /* Netgear */
496 
497 static const struct gpio_led
498 bcm47xx_leds_netgear_wndr3400v1[] __initconst = {
499 	BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
500 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
501 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
502 };
503 
504 static const struct gpio_led
505 bcm47xx_leds_netgear_wndr4500v1[] __initconst = {
506 	BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
507 	BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
508 	BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
509 	BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
510 	BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
511 	BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
512 	BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF),
513 };
514 
515 static const struct gpio_led
516 bcm47xx_leds_netgear_wnr1000_v3[] __initconst = {
517 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
518 	BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
519 };
520 
521 static const struct gpio_led
522 bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
523 	BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
524 	BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
525 	BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
526 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
527 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
528 };
529 
530 static const struct gpio_led
531 bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
532 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
533 	BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
534 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
535 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
536 };
537 
538 static const struct gpio_led
539 bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
540 	BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
541 	BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
542 	BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
543 };
544 
545 /* Siemens */
546 static const struct gpio_led
547 bcm47xx_leds_siemens_se505v2[] __initconst = {
548 	BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
549 	BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
550 	BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
551 };
552 
553 /* SimpleTech */
554 
555 static const struct gpio_led
556 bcm47xx_leds_simpletech_simpleshare[] __initconst = {
557 	BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */
558 };
559 
560 /**************************************************
561  * Init
562  **************************************************/
563 
564 static struct gpio_led_platform_data bcm47xx_leds_pdata __initdata;
565 
566 #define bcm47xx_set_pdata(dev_leds) do {				\
567 	bcm47xx_leds_pdata.leds = dev_leds;				\
568 	bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds);		\
569 } while (0)
570 
571 static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
572 #define bcm47xx_set_pdata_extra(dev_leds) do {				\
573 	bcm47xx_leds_pdata_extra.leds = dev_leds;			\
574 	bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds);	\
575 } while (0)
576 
577 void __init bcm47xx_leds_register(void)
578 {
579 	enum bcm47xx_board board = bcm47xx_board_get();
580 
581 	switch (board) {
582 	case BCM47XX_BOARD_ASUS_RTN10U:
583 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
584 		break;
585 	case BCM47XX_BOARD_ASUS_RTN12:
586 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
587 		break;
588 	case BCM47XX_BOARD_ASUS_RTN15U:
589 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u);
590 		break;
591 	case BCM47XX_BOARD_ASUS_RTN16:
592 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
593 		break;
594 	case BCM47XX_BOARD_ASUS_RTN66U:
595 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u);
596 		break;
597 	case BCM47XX_BOARD_ASUS_WL300G:
598 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g);
599 		break;
600 	case BCM47XX_BOARD_ASUS_WL320GE:
601 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge);
602 		break;
603 	case BCM47XX_BOARD_ASUS_WL330GE:
604 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge);
605 		break;
606 	case BCM47XX_BOARD_ASUS_WL500G:
607 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500g);
608 		break;
609 	case BCM47XX_BOARD_ASUS_WL500GD:
610 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd);
611 		break;
612 	case BCM47XX_BOARD_ASUS_WL500GPV1:
613 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1);
614 		break;
615 	case BCM47XX_BOARD_ASUS_WL500GPV2:
616 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2);
617 		break;
618 	case BCM47XX_BOARD_ASUS_WL500W:
619 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w);
620 		break;
621 	case BCM47XX_BOARD_ASUS_WL520GC:
622 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc);
623 		break;
624 	case BCM47XX_BOARD_ASUS_WL520GU:
625 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu);
626 		break;
627 	case BCM47XX_BOARD_ASUS_WL700GE:
628 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge);
629 		break;
630 	case BCM47XX_BOARD_ASUS_WLHDD:
631 		bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd);
632 		break;
633 
634 	case BCM47XX_BOARD_BELKIN_F7D3301:
635 	case BCM47XX_BOARD_BELKIN_F7D3302:
636 	case BCM47XX_BOARD_BELKIN_F7D4301:
637 	case BCM47XX_BOARD_BELKIN_F7D4302:
638 	case BCM47XX_BOARD_BELKIN_F7D4401:
639 		bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301);
640 		break;
641 
642 	case BCM47XX_BOARD_BUFFALO_WHR2_A54G54:
643 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54);
644 		break;
645 	case BCM47XX_BOARD_BUFFALO_WHR_G125:
646 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125);
647 		break;
648 	case BCM47XX_BOARD_BUFFALO_WHR_G54S:
649 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s);
650 		break;
651 	case BCM47XX_BOARD_BUFFALO_WHR_HP_G54:
652 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54);
653 		break;
654 	case BCM47XX_BOARD_BUFFALO_WZR_G300N:
655 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n);
656 		break;
657 	case BCM47XX_BOARD_BUFFALO_WZR_RS_G54:
658 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54);
659 		break;
660 	case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP:
661 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp);
662 		break;
663 
664 	case BCM47XX_BOARD_DELL_TM2300:
665 		bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300);
666 		break;
667 
668 	case BCM47XX_BOARD_DLINK_DIR130:
669 		bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130);
670 		break;
671 	case BCM47XX_BOARD_DLINK_DIR330:
672 		bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
673 		break;
674 
675 	case BCM47XX_BOARD_HUAWEI_E970:
676 		bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
677 		break;
678 
679 	case BCM47XX_BOARD_LINKSYS_E1000V1:
680 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1);
681 		break;
682 	case BCM47XX_BOARD_LINKSYS_E1000V21:
683 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21);
684 		break;
685 	case BCM47XX_BOARD_LINKSYS_E2000V1:
686 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1);
687 		break;
688 	case BCM47XX_BOARD_LINKSYS_E3000V1:
689 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1);
690 		break;
691 	case BCM47XX_BOARD_LINKSYS_E3200V1:
692 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1);
693 		break;
694 	case BCM47XX_BOARD_LINKSYS_E4200V1:
695 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1);
696 		break;
697 	case BCM47XX_BOARD_LINKSYS_WRT150NV1:
698 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1);
699 		break;
700 	case BCM47XX_BOARD_LINKSYS_WRT150NV11:
701 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11);
702 		break;
703 	case BCM47XX_BOARD_LINKSYS_WRT160NV1:
704 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1);
705 		break;
706 	case BCM47XX_BOARD_LINKSYS_WRT160NV3:
707 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
708 		break;
709 	case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
710 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
711 		break;
712 	case BCM47XX_BOARD_LINKSYS_WRT300NV11:
713 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
714 		break;
715 	case BCM47XX_BOARD_LINKSYS_WRT310NV1:
716 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
717 		break;
718 	case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
719 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
720 		break;
721 	case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
722 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
723 		break;
724 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
725 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
726 		break;
727 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
728 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0467);
729 		break;
730 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
731 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
732 		break;
733 	case BCM47XX_BOARD_LINKSYS_WRT610NV1:
734 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
735 		break;
736 	case BCM47XX_BOARD_LINKSYS_WRT610NV2:
737 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2);
738 		break;
739 	case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
740 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
741 		break;
742 
743 	case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
744 		bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1);
745 		break;
746 	case BCM47XX_BOARD_LUXUL_XAP_310_V1:
747 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1);
748 		break;
749 	case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
750 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1);
751 		break;
752 	case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
753 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1);
754 		break;
755 	case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
756 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1);
757 		break;
758 	case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
759 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
760 		bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
761 		break;
762 	case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
763 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
764 		break;
765 	case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
766 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1);
767 		break;
768 	case BCM47XX_BOARD_LUXUL_XWR_600_V1:
769 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1);
770 		break;
771 	case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
772 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
773 		bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
774 		break;
775 
776 	case BCM47XX_BOARD_MICROSOFT_MN700:
777 		bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
778 		break;
779 
780 	case BCM47XX_BOARD_MOTOROLA_WE800G:
781 		bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
782 		break;
783 	case BCM47XX_BOARD_MOTOROLA_WR850GP:
784 		bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp);
785 		break;
786 	case BCM47XX_BOARD_MOTOROLA_WR850GV2V3:
787 		bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3);
788 		break;
789 
790 	case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
791 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1);
792 		break;
793 	case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
794 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
795 		break;
796 	case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
797 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr1000_v3);
798 		break;
799 	case BCM47XX_BOARD_NETGEAR_WNR3500L:
800 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
801 		break;
802 	case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
803 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
804 		break;
805 	case BCM47XX_BOARD_NETGEAR_WNR834BV2:
806 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
807 		break;
808 
809 	case BCM47XX_BOARD_SIEMENS_SE505V2:
810 		bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
811 		break;
812 
813 	case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
814 		bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
815 		break;
816 
817 	default:
818 		pr_debug("No LEDs configuration found for this device\n");
819 		return;
820 	}
821 
822 	gpio_led_register_device(-1, &bcm47xx_leds_pdata);
823 	if (bcm47xx_leds_pdata_extra.num_leds)
824 		gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
825 }
826