xref: /linux/arch/mips/bcm47xx/leds.c (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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_b593u_12[] __initconst = {
227 	BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
228 };
229 
230 static const struct gpio_led
231 bcm47xx_leds_huawei_e970[] __initconst = {
232 	BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
233 };
234 
235 /* Linksys */
236 
237 static const struct gpio_led
238 bcm47xx_leds_linksys_e1000v1[] __initconst = {
239 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
240 	BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
241 	BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
242 	BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
243 };
244 
245 static const struct gpio_led
246 bcm47xx_leds_linksys_e1000v21[] __initconst = {
247 	BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
248 	BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
249 	BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
250 	BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
251 };
252 
253 static const struct gpio_led
254 bcm47xx_leds_linksys_e2000v1[] __initconst = {
255 	BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
256 	BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
257 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
258 	BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
259 };
260 
261 static const struct gpio_led
262 bcm47xx_leds_linksys_e3000v1[] __initconst = {
263 	BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
264 	BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
265 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
266 	BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
267 	BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
268 };
269 
270 static const struct gpio_led
271 bcm47xx_leds_linksys_e3200v1[] __initconst = {
272 	BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
273 };
274 
275 static const struct gpio_led
276 bcm47xx_leds_linksys_e4200v1[] __initconst = {
277 	BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON),
278 };
279 
280 static const struct gpio_led
281 bcm47xx_leds_linksys_wrt150nv1[] __initconst = {
282 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
283 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
284 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
285 };
286 
287 static const struct gpio_led
288 bcm47xx_leds_linksys_wrt150nv11[] __initconst = {
289 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
290 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
291 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
292 };
293 
294 static const struct gpio_led
295 bcm47xx_leds_linksys_wrt160nv1[] __initconst = {
296 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
297 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
298 	BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
299 };
300 
301 static const struct gpio_led
302 bcm47xx_leds_linksys_wrt160nv3[] __initconst = {
303 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
304 	BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
305 	BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
306 };
307 
308 static const struct gpio_led
309 bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
310 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
311 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
312 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
313 };
314 
315 static const struct gpio_led
316 bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
317 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
318 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
319 	BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
320 };
321 
322 static const struct gpio_led
323 bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
324 	BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
325 	BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
326 	BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
327 };
328 
329 static const struct gpio_led
330 bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
331 	BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
332 	BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
333 	BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
334 };
335 
336 static const struct gpio_led
337 bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
338 	BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
339 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
340 	BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
341 	BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
342 };
343 
344 static const struct gpio_led
345 bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
346 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
347 	BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
348 	BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
349 };
350 
351 /* Verified on: WRT54GS V1.0 */
352 static const struct gpio_led
353 bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
354 	BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
355 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
356 	BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
357 };
358 
359 /* Verified on: WRT54GL V1.1 */
360 static const struct gpio_led
361 bcm47xx_leds_linksys_wrt54g_type_0467[] __initconst = {
362 	BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
363 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
364 	BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
365 	BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
366 	BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
367 };
368 
369 static const struct gpio_led
370 bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
371 	BCM47XX_GPIO_LED(0, "unk", "usb",  1, LEDS_GPIO_DEFSTATE_OFF),
372 	BCM47XX_GPIO_LED(1, "unk", "power",  0, LEDS_GPIO_DEFSTATE_OFF),
373 	BCM47XX_GPIO_LED(3, "amber", "wps",  1, LEDS_GPIO_DEFSTATE_OFF),
374 	BCM47XX_GPIO_LED(9, "blue", "wps",  1, LEDS_GPIO_DEFSTATE_OFF),
375 };
376 
377 static const struct gpio_led
378 bcm47xx_leds_linksys_wrt610nv2[] __initconst = {
379 	BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
380 	BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
381 	BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
382 	BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
383 	BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
384 };
385 
386 static const struct gpio_led
387 bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
388 	BCM47XX_GPIO_LED(0, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
389 	BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
390 	BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
391 	BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
392 };
393 
394 /* Luxul */
395 
396 static const struct gpio_led
397 bcm47xx_leds_luxul_abr_4400_v1[] __initconst = {
398 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
399 	BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
400 };
401 
402 static const struct gpio_led
403 bcm47xx_leds_luxul_xap_310_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_1210_v1[] __initconst = {
409 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
410 };
411 
412 static const struct gpio_led
413 bcm47xx_leds_luxul_xap_1230_v1[] __initconst = {
414 	BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
415 	BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
416 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
417 };
418 
419 static const struct gpio_led
420 bcm47xx_leds_luxul_xap_1240_v1[] __initconst = {
421 	BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
422 	BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
423 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
424 };
425 
426 static const struct gpio_led
427 bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
428 	BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
429 };
430 
431 static const struct gpio_led
432 bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = {
433 	BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
434 	BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
435 };
436 
437 static const struct gpio_led
438 bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
439 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
440 	BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
441 };
442 
443 static const struct gpio_led
444 bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = {
445 	BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"),
446 	BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
447 };
448 
449 static const struct gpio_led
450 bcm47xx_leds_luxul_xwr_600_v1[] __initconst = {
451 	BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
452 	BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
453 	BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
454 };
455 
456 static const struct gpio_led
457 bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
458 	BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
459 	BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
460 	BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"),
461 	BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
462 };
463 
464 static const struct gpio_led
465 bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
466 	BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
467 };
468 
469 /* Microsoft */
470 
471 static const struct gpio_led
472 bcm47xx_leds_microsoft_nm700[] __initconst = {
473 	BCM47XX_GPIO_LED(6, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
474 };
475 
476 /* Motorola */
477 
478 static const struct gpio_led
479 bcm47xx_leds_motorola_we800g[] __initconst = {
480 	BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
481 	BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */
482 	BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
483 };
484 
485 static const struct gpio_led
486 bcm47xx_leds_motorola_wr850gp[] __initconst = {
487 	BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
488 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
489 	BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
490 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
491 };
492 
493 static const struct gpio_led
494 bcm47xx_leds_motorola_wr850gv2v3[] __initconst = {
495 	BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
496 	BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
497 	BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
498 };
499 
500 /* Netgear */
501 
502 static const struct gpio_led
503 bcm47xx_leds_netgear_wndr3400v1[] __initconst = {
504 	BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
505 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
506 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
507 };
508 
509 static const struct gpio_led
510 bcm47xx_leds_netgear_wndr4500v1[] __initconst = {
511 	BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
512 	BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
513 	BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
514 	BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
515 	BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
516 	BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
517 	BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF),
518 };
519 
520 static const struct gpio_led
521 bcm47xx_leds_netgear_wnr1000_v3[] __initconst = {
522 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
523 	BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
524 };
525 
526 static const struct gpio_led
527 bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
528 	BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
529 	BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
530 	BCM47XX_GPIO_LED(2, "green", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
531 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
532 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
533 };
534 
535 static const struct gpio_led
536 bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
537 	BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
538 	BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
539 	BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
540 	BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
541 };
542 
543 static const struct gpio_led
544 bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
545 	BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
546 	BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
547 	BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
548 };
549 
550 /* Siemens */
551 static const struct gpio_led
552 bcm47xx_leds_siemens_se505v2[] __initconst = {
553 	BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
554 	BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
555 	BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
556 };
557 
558 /* SimpleTech */
559 
560 static const struct gpio_led
561 bcm47xx_leds_simpletech_simpleshare[] __initconst = {
562 	BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */
563 };
564 
565 /**************************************************
566  * Init
567  **************************************************/
568 
569 static struct gpio_led_platform_data bcm47xx_leds_pdata __initdata;
570 
571 #define bcm47xx_set_pdata(dev_leds) do {				\
572 	bcm47xx_leds_pdata.leds = dev_leds;				\
573 	bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds);		\
574 } while (0)
575 
576 static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
577 #define bcm47xx_set_pdata_extra(dev_leds) do {				\
578 	bcm47xx_leds_pdata_extra.leds = dev_leds;			\
579 	bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds);	\
580 } while (0)
581 
582 void __init bcm47xx_leds_register(void)
583 {
584 	enum bcm47xx_board board = bcm47xx_board_get();
585 
586 	switch (board) {
587 	case BCM47XX_BOARD_ASUS_RTN10U:
588 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
589 		break;
590 	case BCM47XX_BOARD_ASUS_RTN12:
591 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
592 		break;
593 	case BCM47XX_BOARD_ASUS_RTN15U:
594 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u);
595 		break;
596 	case BCM47XX_BOARD_ASUS_RTN16:
597 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
598 		break;
599 	case BCM47XX_BOARD_ASUS_RTN66U:
600 		bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u);
601 		break;
602 	case BCM47XX_BOARD_ASUS_WL300G:
603 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g);
604 		break;
605 	case BCM47XX_BOARD_ASUS_WL320GE:
606 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge);
607 		break;
608 	case BCM47XX_BOARD_ASUS_WL330GE:
609 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge);
610 		break;
611 	case BCM47XX_BOARD_ASUS_WL500G:
612 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500g);
613 		break;
614 	case BCM47XX_BOARD_ASUS_WL500GD:
615 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd);
616 		break;
617 	case BCM47XX_BOARD_ASUS_WL500GPV1:
618 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1);
619 		break;
620 	case BCM47XX_BOARD_ASUS_WL500GPV2:
621 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2);
622 		break;
623 	case BCM47XX_BOARD_ASUS_WL500W:
624 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w);
625 		break;
626 	case BCM47XX_BOARD_ASUS_WL520GC:
627 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc);
628 		break;
629 	case BCM47XX_BOARD_ASUS_WL520GU:
630 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu);
631 		break;
632 	case BCM47XX_BOARD_ASUS_WL700GE:
633 		bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge);
634 		break;
635 	case BCM47XX_BOARD_ASUS_WLHDD:
636 		bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd);
637 		break;
638 
639 	case BCM47XX_BOARD_BELKIN_F7D3301:
640 	case BCM47XX_BOARD_BELKIN_F7D3302:
641 	case BCM47XX_BOARD_BELKIN_F7D4301:
642 	case BCM47XX_BOARD_BELKIN_F7D4302:
643 	case BCM47XX_BOARD_BELKIN_F7D4401:
644 		bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301);
645 		break;
646 
647 	case BCM47XX_BOARD_BUFFALO_WHR2_A54G54:
648 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54);
649 		break;
650 	case BCM47XX_BOARD_BUFFALO_WHR_G125:
651 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125);
652 		break;
653 	case BCM47XX_BOARD_BUFFALO_WHR_G54S:
654 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s);
655 		break;
656 	case BCM47XX_BOARD_BUFFALO_WHR_HP_G54:
657 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54);
658 		break;
659 	case BCM47XX_BOARD_BUFFALO_WZR_G300N:
660 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n);
661 		break;
662 	case BCM47XX_BOARD_BUFFALO_WZR_RS_G54:
663 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54);
664 		break;
665 	case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP:
666 		bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp);
667 		break;
668 
669 	case BCM47XX_BOARD_DELL_TM2300:
670 		bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300);
671 		break;
672 
673 	case BCM47XX_BOARD_DLINK_DIR130:
674 		bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130);
675 		break;
676 	case BCM47XX_BOARD_DLINK_DIR330:
677 		bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
678 		break;
679 
680 	case BCM47XX_BOARD_HUAWEI_B593U_12:
681 		bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12);
682 		break;
683 	case BCM47XX_BOARD_HUAWEI_E970:
684 		bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
685 		break;
686 
687 	case BCM47XX_BOARD_LINKSYS_E1000V1:
688 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1);
689 		break;
690 	case BCM47XX_BOARD_LINKSYS_E1000V21:
691 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21);
692 		break;
693 	case BCM47XX_BOARD_LINKSYS_E2000V1:
694 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1);
695 		break;
696 	case BCM47XX_BOARD_LINKSYS_E3000V1:
697 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1);
698 		break;
699 	case BCM47XX_BOARD_LINKSYS_E3200V1:
700 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1);
701 		break;
702 	case BCM47XX_BOARD_LINKSYS_E4200V1:
703 		bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1);
704 		break;
705 	case BCM47XX_BOARD_LINKSYS_WRT150NV1:
706 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1);
707 		break;
708 	case BCM47XX_BOARD_LINKSYS_WRT150NV11:
709 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11);
710 		break;
711 	case BCM47XX_BOARD_LINKSYS_WRT160NV1:
712 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1);
713 		break;
714 	case BCM47XX_BOARD_LINKSYS_WRT160NV3:
715 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
716 		break;
717 	case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
718 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
719 		break;
720 	case BCM47XX_BOARD_LINKSYS_WRT300NV11:
721 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
722 		break;
723 	case BCM47XX_BOARD_LINKSYS_WRT310NV1:
724 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
725 		break;
726 	case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
727 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
728 		break;
729 	case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
730 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
731 		break;
732 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
733 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
734 		break;
735 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
736 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0467);
737 		break;
738 	case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
739 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
740 		break;
741 	case BCM47XX_BOARD_LINKSYS_WRT610NV1:
742 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
743 		break;
744 	case BCM47XX_BOARD_LINKSYS_WRT610NV2:
745 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2);
746 		break;
747 	case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
748 		bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
749 		break;
750 
751 	case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
752 		bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1);
753 		break;
754 	case BCM47XX_BOARD_LUXUL_XAP_310_V1:
755 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1);
756 		break;
757 	case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
758 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1);
759 		break;
760 	case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
761 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1);
762 		break;
763 	case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
764 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1);
765 		break;
766 	case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
767 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
768 		bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
769 		break;
770 	case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
771 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
772 		break;
773 	case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
774 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1);
775 		break;
776 	case BCM47XX_BOARD_LUXUL_XWR_600_V1:
777 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1);
778 		break;
779 	case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
780 		bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
781 		bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
782 		break;
783 
784 	case BCM47XX_BOARD_MICROSOFT_MN700:
785 		bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
786 		break;
787 
788 	case BCM47XX_BOARD_MOTOROLA_WE800G:
789 		bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
790 		break;
791 	case BCM47XX_BOARD_MOTOROLA_WR850GP:
792 		bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp);
793 		break;
794 	case BCM47XX_BOARD_MOTOROLA_WR850GV2V3:
795 		bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3);
796 		break;
797 
798 	case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
799 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1);
800 		break;
801 	case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
802 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
803 		break;
804 	case BCM47XX_BOARD_NETGEAR_WNR1000_V3:
805 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr1000_v3);
806 		break;
807 	case BCM47XX_BOARD_NETGEAR_WNR3500L:
808 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
809 		break;
810 	case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
811 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
812 		break;
813 	case BCM47XX_BOARD_NETGEAR_WNR834BV2:
814 		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
815 		break;
816 
817 	case BCM47XX_BOARD_SIEMENS_SE505V2:
818 		bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
819 		break;
820 
821 	case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
822 		bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
823 		break;
824 
825 	default:
826 		pr_debug("No LEDs configuration found for this device\n");
827 		return;
828 	}
829 
830 	gpio_led_register_device(-1, &bcm47xx_leds_pdata);
831 	if (bcm47xx_leds_pdata_extra.num_leds)
832 		gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
833 }
834