1 #include "bcm47xx_private.h"
3 #include <linux/leds.h>
4 #include <bcm47xx_board.h>
6 /**************************************************
8 **************************************************/
10 #define BCM47XX_GPIO_LED(_gpio, _color, _function, _active_low, \
13 .name = "bcm47xx:" _color ":" _function, \
15 .active_low = _active_low, \
16 .default_state = _default_state, \
19 #define BCM47XX_GPIO_LED_TRIGGER(_gpio, _color, _function, _active_low, \
22 .name = "bcm47xx:" _color ":" _function, \
24 .active_low = _active_low, \
25 .default_state = LEDS_GPIO_DEFSTATE_OFF, \
26 .default_trigger = _default_trigger, \
31 static const struct gpio_led
32 bcm47xx_leds_asus_rtn12
[] __initconst
= {
33 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
34 BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
37 static const struct gpio_led
38 bcm47xx_leds_asus_rtn16
[] __initconst
= {
39 BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
40 BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
43 static const struct gpio_led
44 bcm47xx_leds_asus_rtn66u
[] __initconst
= {
45 BCM47XX_GPIO_LED(12, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
46 BCM47XX_GPIO_LED(15, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF
),
49 static const struct gpio_led
50 bcm47xx_leds_asus_wl300g
[] __initconst
= {
51 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
54 static const struct gpio_led
55 bcm47xx_leds_asus_wl320ge
[] __initconst
= {
56 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
57 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
58 BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF
),
61 static const struct gpio_led
62 bcm47xx_leds_asus_wl330ge
[] __initconst
= {
63 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
66 static const struct gpio_led
67 bcm47xx_leds_asus_wl500gd
[] __initconst
= {
68 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
71 static const struct gpio_led
72 bcm47xx_leds_asus_wl500gpv1
[] __initconst
= {
73 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
76 static const struct gpio_led
77 bcm47xx_leds_asus_wl500gpv2
[] __initconst
= {
78 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
79 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
82 static const struct gpio_led
83 bcm47xx_leds_asus_wl500w
[] __initconst
= {
84 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
87 static const struct gpio_led
88 bcm47xx_leds_asus_wl520gc
[] __initconst
= {
89 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
90 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
93 static const struct gpio_led
94 bcm47xx_leds_asus_wl520gu
[] __initconst
= {
95 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
96 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
99 static const struct gpio_led
100 bcm47xx_leds_asus_wl700ge
[] __initconst
= {
101 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */
104 static const struct gpio_led
105 bcm47xx_leds_asus_wlhdd
[] __initconst
= {
106 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
107 BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF
),
112 static const struct gpio_led
113 bcm47xx_leds_belkin_f7d4301
[] __initconst
= {
114 BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
115 BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF
),
116 BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
117 BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
118 BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF
),
119 BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF
),
124 static const struct gpio_led
125 bcm47xx_leds_buffalo_whr2_a54g54
[] __initconst
= {
126 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
129 static const struct gpio_led
130 bcm47xx_leds_buffalo_whr_g125
[] __initconst
= {
131 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF
),
132 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
133 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF
),
134 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
135 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
138 static const struct gpio_led
139 bcm47xx_leds_buffalo_whr_g54s
[] __initconst
= {
140 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF
),
141 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
142 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF
),
143 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
144 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
147 static const struct gpio_led
148 bcm47xx_leds_buffalo_whr_hp_g54
[] __initconst
= {
149 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF
),
150 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
151 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF
),
152 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
153 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
156 static const struct gpio_led
157 bcm47xx_leds_buffalo_wzr_g300n
[] __initconst
= {
158 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF
),
159 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
160 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
163 static const struct gpio_led
164 bcm47xx_leds_buffalo_wzr_rs_g54
[] __initconst
= {
165 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
166 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF
),
167 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
170 static const struct gpio_led
171 bcm47xx_leds_buffalo_wzr_rs_g54hp
[] __initconst
= {
172 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
173 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF
),
174 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
179 static const struct gpio_led
180 bcm47xx_leds_dell_tm2300
[] __initconst
= {
181 BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
182 BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
187 static const struct gpio_led
188 bcm47xx_leds_dlink_dir130
[] __initconst
= {
189 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
190 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF
),
193 static const struct gpio_led
194 bcm47xx_leds_dlink_dir330
[] __initconst
= {
195 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
196 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF
),
197 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF
),
202 static const struct gpio_led
203 bcm47xx_leds_huawei_e970
[] __initconst
= {
204 BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
209 static const struct gpio_led
210 bcm47xx_leds_linksys_e1000v1
[] __initconst
= {
211 BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
212 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
213 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
214 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
217 static const struct gpio_led
218 bcm47xx_leds_linksys_e1000v21
[] __initconst
= {
219 BCM47XX_GPIO_LED(5, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
220 BCM47XX_GPIO_LED(6, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
221 BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF
),
222 BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF
),
225 static const struct gpio_led
226 bcm47xx_leds_linksys_e2000v1
[] __initconst
= {
227 BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
228 BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
229 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
230 BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
233 static const struct gpio_led
234 bcm47xx_leds_linksys_e3000v1
[] __initconst
= {
235 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
236 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
237 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
238 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
239 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF
),
242 static const struct gpio_led
243 bcm47xx_leds_linksys_e3200v1
[] __initconst
= {
244 BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
247 static const struct gpio_led
248 bcm47xx_leds_linksys_e4200v1
[] __initconst
= {
249 BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
252 static const struct gpio_led
253 bcm47xx_leds_linksys_wrt150nv1
[] __initconst
= {
254 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
255 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
256 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
259 static const struct gpio_led
260 bcm47xx_leds_linksys_wrt150nv11
[] __initconst
= {
261 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
262 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
263 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
266 static const struct gpio_led
267 bcm47xx_leds_linksys_wrt160nv1
[] __initconst
= {
268 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
269 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
270 BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
273 static const struct gpio_led
274 bcm47xx_leds_linksys_wrt160nv3
[] __initconst
= {
275 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
276 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
277 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
280 static const struct gpio_led
281 bcm47xx_leds_linksys_wrt300nv11
[] __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
),
287 static const struct gpio_led
288 bcm47xx_leds_linksys_wrt310nv1
[] __initconst
= {
289 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
290 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
291 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
294 static const struct gpio_led
295 bcm47xx_leds_linksys_wrt54gsv1
[] __initconst
= {
296 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF
),
297 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
298 BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
299 BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
302 static const struct gpio_led
303 bcm47xx_leds_linksys_wrt54g3gv2
[] __initconst
= {
304 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
305 BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF
),
306 BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF
),
309 static const struct gpio_led
310 bcm47xx_leds_linksys_wrt610nv1
[] __initconst
= {
311 BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF
),
312 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF
),
313 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
314 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
317 static const struct gpio_led
318 bcm47xx_leds_linksys_wrt610nv2
[] __initconst
= {
319 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
320 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
321 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
322 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
323 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF
),
326 static const struct gpio_led
327 bcm47xx_leds_linksys_wrtsl54gs
[] __initconst
= {
328 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
329 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
330 BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
331 BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
332 BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF
),
337 static const struct gpio_led
338 bcm47xx_leds_motorola_we800g
[] __initconst
= {
339 BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF
),
340 BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF
), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */
341 BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
344 static const struct gpio_led
345 bcm47xx_leds_motorola_wr850gp
[] __initconst
= {
346 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
347 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
348 BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF
),
349 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
352 static const struct gpio_led
353 bcm47xx_leds_motorola_wr850gv2v3
[] __initconst
= {
354 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
355 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
356 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF
),
361 static const struct gpio_led
362 bcm47xx_leds_netgear_wndr3400v1
[] __initconst
= {
363 BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF
),
364 BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
365 BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF
),
368 static const struct gpio_led
369 bcm47xx_leds_netgear_wndr4500v1
[] __initconst
= {
370 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF
),
371 BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
372 BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF
),
373 BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF
),
374 BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF
),
375 BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF
),
376 BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF
),
379 static const struct gpio_led
380 bcm47xx_leds_netgear_wnr834bv2
[] __initconst
= {
381 BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON
),
382 BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF
),
383 BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF
),
387 static const struct gpio_led
388 bcm47xx_leds_siemens_se505v2
[] __initconst
= {
389 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF
),
390 BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF
),
391 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON
),
396 static const struct gpio_led
397 bcm47xx_leds_simpletech_simpleshare
[] __initconst
= {
398 BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF
), /* "Ready" LED */
401 /**************************************************
403 **************************************************/
405 static struct gpio_led_platform_data bcm47xx_leds_pdata
;
407 #define bcm47xx_set_pdata(dev_leds) do { \
408 bcm47xx_leds_pdata.leds = dev_leds; \
409 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
412 void __init
bcm47xx_leds_register(void)
414 enum bcm47xx_board board
= bcm47xx_board_get();
417 case BCM47XX_BOARD_ASUS_RTN12
:
418 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12
);
420 case BCM47XX_BOARD_ASUS_RTN16
:
421 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16
);
423 case BCM47XX_BOARD_ASUS_RTN66U
:
424 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u
);
426 case BCM47XX_BOARD_ASUS_WL300G
:
427 bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g
);
429 case BCM47XX_BOARD_ASUS_WL320GE
:
430 bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge
);
432 case BCM47XX_BOARD_ASUS_WL330GE
:
433 bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge
);
435 case BCM47XX_BOARD_ASUS_WL500GD
:
436 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd
);
438 case BCM47XX_BOARD_ASUS_WL500GPV1
:
439 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1
);
441 case BCM47XX_BOARD_ASUS_WL500GPV2
:
442 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2
);
444 case BCM47XX_BOARD_ASUS_WL500W
:
445 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w
);
447 case BCM47XX_BOARD_ASUS_WL520GC
:
448 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc
);
450 case BCM47XX_BOARD_ASUS_WL520GU
:
451 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu
);
453 case BCM47XX_BOARD_ASUS_WL700GE
:
454 bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge
);
456 case BCM47XX_BOARD_ASUS_WLHDD
:
457 bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd
);
460 case BCM47XX_BOARD_BELKIN_F7D3301
:
461 case BCM47XX_BOARD_BELKIN_F7D3302
:
462 case BCM47XX_BOARD_BELKIN_F7D4301
:
463 case BCM47XX_BOARD_BELKIN_F7D4302
:
464 case BCM47XX_BOARD_BELKIN_F7D4401
:
465 bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301
);
468 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54
:
469 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54
);
471 case BCM47XX_BOARD_BUFFALO_WHR_G125
:
472 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125
);
474 case BCM47XX_BOARD_BUFFALO_WHR_G54S
:
475 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s
);
477 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54
:
478 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54
);
480 case BCM47XX_BOARD_BUFFALO_WZR_G300N
:
481 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n
);
483 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54
:
484 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54
);
486 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP
:
487 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp
);
490 case BCM47XX_BOARD_DELL_TM2300
:
491 bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300
);
494 case BCM47XX_BOARD_DLINK_DIR130
:
495 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130
);
497 case BCM47XX_BOARD_DLINK_DIR330
:
498 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330
);
501 case BCM47XX_BOARD_HUAWEI_E970
:
502 bcm47xx_set_pdata(bcm47xx_leds_huawei_e970
);
505 case BCM47XX_BOARD_LINKSYS_E1000V1
:
506 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1
);
508 case BCM47XX_BOARD_LINKSYS_E1000V21
:
509 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21
);
511 case BCM47XX_BOARD_LINKSYS_E2000V1
:
512 bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1
);
514 case BCM47XX_BOARD_LINKSYS_E3000V1
:
515 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1
);
517 case BCM47XX_BOARD_LINKSYS_E3200V1
:
518 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1
);
520 case BCM47XX_BOARD_LINKSYS_E4200V1
:
521 bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1
);
523 case BCM47XX_BOARD_LINKSYS_WRT150NV1
:
524 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1
);
526 case BCM47XX_BOARD_LINKSYS_WRT150NV11
:
527 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11
);
529 case BCM47XX_BOARD_LINKSYS_WRT160NV1
:
530 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1
);
532 case BCM47XX_BOARD_LINKSYS_WRT160NV3
:
533 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3
);
535 case BCM47XX_BOARD_LINKSYS_WRT300NV11
:
536 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11
);
538 case BCM47XX_BOARD_LINKSYS_WRT310NV1
:
539 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1
);
541 case BCM47XX_BOARD_LINKSYS_WRT54G
:
542 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1
);
544 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2
:
545 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2
);
547 case BCM47XX_BOARD_LINKSYS_WRT610NV1
:
548 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1
);
550 case BCM47XX_BOARD_LINKSYS_WRT610NV2
:
551 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2
);
553 case BCM47XX_BOARD_LINKSYS_WRTSL54GS
:
554 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs
);
557 case BCM47XX_BOARD_MOTOROLA_WE800G
:
558 bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g
);
560 case BCM47XX_BOARD_MOTOROLA_WR850GP
:
561 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp
);
563 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3
:
564 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3
);
567 case BCM47XX_BOARD_NETGEAR_WNDR3400V1
:
568 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1
);
570 case BCM47XX_BOARD_NETGEAR_WNDR4500V1
:
571 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1
);
573 case BCM47XX_BOARD_NETGEAR_WNR834BV2
:
574 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2
);
577 case BCM47XX_BOARD_SIEMENS_SE505V2
:
578 bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2
);
581 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE
:
582 bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare
);
586 pr_debug("No LEDs configuration found for this device\n");
590 gpio_led_register_device(-1, &bcm47xx_leds_pdata
);