blob: 34a7b3fbdfd9046a1e6f29d5076eecd60d672ef8 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Rafał Miłecki515fa752014-01-14 12:14:41 +01002#include "bcm47xx_private.h"
3
4#include <linux/leds.h>
5#include <bcm47xx_board.h>
6
Rafał Miłecki2d0816d2014-01-02 12:32:57 +01007/**************************************************
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
Rafał Miłeckiaeee3f52014-01-03 09:04:39 +010020#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
Rafał Miłecki2d0816d2014-01-02 12:32:57 +010030/* Asus */
31
32static const struct gpio_led
33bcm47xx_leds_asus_rtn12[] __initconst = {
34 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
35 BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
36};
37
38static const struct gpio_led
Rafał Miłecki9194b342014-07-17 23:24:30 +020039bcm47xx_leds_asus_rtn15u[] __initconst = {
40 /* TODO: Add "wlan" LED */
41 BCM47XX_GPIO_LED(3, "blue", "wan", 1, LEDS_GPIO_DEFSTATE_OFF),
42 BCM47XX_GPIO_LED(4, "blue", "lan", 1, LEDS_GPIO_DEFSTATE_OFF),
43 BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
44 BCM47XX_GPIO_LED(9, "blue", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
45};
46
47static const struct gpio_led
Rafał Miłecki2d0816d2014-01-02 12:32:57 +010048bcm47xx_leds_asus_rtn16[] __initconst = {
49 BCM47XX_GPIO_LED(1, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
50 BCM47XX_GPIO_LED(7, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
51};
52
53static const struct gpio_led
54bcm47xx_leds_asus_rtn66u[] __initconst = {
Rafał Miłecki9194b342014-07-17 23:24:30 +020055 BCM47XX_GPIO_LED(12, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
56 BCM47XX_GPIO_LED(15, "blue", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
Rafał Miłecki2d0816d2014-01-02 12:32:57 +010057};
58
59static const struct gpio_led
60bcm47xx_leds_asus_wl300g[] __initconst = {
61 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
62};
63
64static const struct gpio_led
65bcm47xx_leds_asus_wl320ge[] __initconst = {
66 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
67 BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
68 BCM47XX_GPIO_LED(11, "unk", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
69};
70
71static const struct gpio_led
72bcm47xx_leds_asus_wl330ge[] __initconst = {
73 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
74};
75
76static const struct gpio_led
Hauke Mehrtens250dc032014-07-29 00:12:09 +020077bcm47xx_leds_asus_wl500g[] __initconst = {
78 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
79};
80
81static const struct gpio_led
Rafał Miłecki2d0816d2014-01-02 12:32:57 +010082bcm47xx_leds_asus_wl500gd[] __initconst = {
83 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
84};
85
86static const struct gpio_led
87bcm47xx_leds_asus_wl500gpv1[] __initconst = {
88 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
89};
90
91static const struct gpio_led
92bcm47xx_leds_asus_wl500gpv2[] __initconst = {
93 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
94 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
95};
96
97static const struct gpio_led
98bcm47xx_leds_asus_wl500w[] __initconst = {
99 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
100};
101
102static const struct gpio_led
103bcm47xx_leds_asus_wl520gc[] __initconst = {
104 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
105 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
106};
107
108static const struct gpio_led
109bcm47xx_leds_asus_wl520gu[] __initconst = {
110 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
111 BCM47XX_GPIO_LED(1, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
112};
113
114static const struct gpio_led
115bcm47xx_leds_asus_wl700ge[] __initconst = {
116 BCM47XX_GPIO_LED(1, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON), /* Labeled "READY" (there is no "power" LED). Originally ON, flashing on USB activity. */
117};
118
119static const struct gpio_led
120bcm47xx_leds_asus_wlhdd[] __initconst = {
121 BCM47XX_GPIO_LED(0, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
122 BCM47XX_GPIO_LED(2, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
123};
124
125/* Belkin */
126
127static const struct gpio_led
128bcm47xx_leds_belkin_f7d4301[] __initconst = {
129 BCM47XX_GPIO_LED(10, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
130 BCM47XX_GPIO_LED(11, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
131 BCM47XX_GPIO_LED(12, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
132 BCM47XX_GPIO_LED(13, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
133 BCM47XX_GPIO_LED(14, "unk", "usb0", 1, LEDS_GPIO_DEFSTATE_OFF),
134 BCM47XX_GPIO_LED(15, "unk", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
135};
136
137/* Buffalo */
138
139static const struct gpio_led
140bcm47xx_leds_buffalo_whr2_a54g54[] __initconst = {
141 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
142};
143
144static const struct gpio_led
145bcm47xx_leds_buffalo_whr_g125[] __initconst = {
146 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
147 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
148 BCM47XX_GPIO_LED(3, "unk", "internal", 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
153static const struct gpio_led
154bcm47xx_leds_buffalo_whr_g54s[] __initconst = {
155 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
156 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
157 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF),
158 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
159 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
160};
161
162static const struct gpio_led
163bcm47xx_leds_buffalo_whr_hp_g54[] __initconst = {
164 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
165 BCM47XX_GPIO_LED(2, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
166 BCM47XX_GPIO_LED(3, "unk", "internal", 1, LEDS_GPIO_DEFSTATE_OFF),
167 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
168 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
169};
170
171static const struct gpio_led
172bcm47xx_leds_buffalo_wzr_g300n[] __initconst = {
173 BCM47XX_GPIO_LED(1, "unk", "bridge", 1, LEDS_GPIO_DEFSTATE_OFF),
174 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
175 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
176};
177
178static const struct gpio_led
179bcm47xx_leds_buffalo_wzr_rs_g54[] __initconst = {
180 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
181 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF),
182 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
183};
184
185static const struct gpio_led
186bcm47xx_leds_buffalo_wzr_rs_g54hp[] __initconst = {
187 BCM47XX_GPIO_LED(6, "unk", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
188 BCM47XX_GPIO_LED(1, "unk", "vpn", 1, LEDS_GPIO_DEFSTATE_OFF),
189 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
190};
191
192/* Dell */
193
194static const struct gpio_led
195bcm47xx_leds_dell_tm2300[] __initconst = {
196 BCM47XX_GPIO_LED(6, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
197 BCM47XX_GPIO_LED(7, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
198};
199
200/* D-Link */
201
202static const struct gpio_led
203bcm47xx_leds_dlink_dir130[] __initconst = {
Rafał Miłeckiaeee3f52014-01-03 09:04:39 +0100204 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100205 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
206};
207
208static const struct gpio_led
209bcm47xx_leds_dlink_dir330[] __initconst = {
Rafał Miłeckiaeee3f52014-01-03 09:04:39 +0100210 BCM47XX_GPIO_LED_TRIGGER(0, "green", "status", 1, "timer"), /* Originally blinking when device is ready, separated from "power" LED */
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100211 BCM47XX_GPIO_LED(4, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
212 BCM47XX_GPIO_LED(6, "blue", "unk", 1, LEDS_GPIO_DEFSTATE_OFF),
213};
214
215/* Huawei */
216
217static const struct gpio_led
218bcm47xx_leds_huawei_e970[] __initconst = {
219 BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
220};
221
222/* Linksys */
223
224static const struct gpio_led
225bcm47xx_leds_linksys_e1000v1[] __initconst = {
226 BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
227 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
228 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
229 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
230};
231
232static const struct gpio_led
233bcm47xx_leds_linksys_e1000v21[] __initconst = {
Rafał Miłecki9194b342014-07-17 23:24:30 +0200234 BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
235 BCM47XX_GPIO_LED(6, "blue", "power", 1, LEDS_GPIO_DEFSTATE_ON),
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100236 BCM47XX_GPIO_LED(7, "amber", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
237 BCM47XX_GPIO_LED(8, "blue", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
238};
239
240static const struct gpio_led
241bcm47xx_leds_linksys_e2000v1[] __initconst = {
242 BCM47XX_GPIO_LED(1, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
243 BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
244 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
245 BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
246};
247
248static const struct gpio_led
249bcm47xx_leds_linksys_e3000v1[] __initconst = {
250 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
251 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
252 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
253 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
254 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
255};
256
257static const struct gpio_led
258bcm47xx_leds_linksys_e3200v1[] __initconst = {
259 BCM47XX_GPIO_LED(3, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
260};
261
262static const struct gpio_led
263bcm47xx_leds_linksys_e4200v1[] __initconst = {
264 BCM47XX_GPIO_LED(5, "white", "power", 1, LEDS_GPIO_DEFSTATE_ON),
265};
266
267static const struct gpio_led
268bcm47xx_leds_linksys_wrt150nv1[] __initconst = {
269 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
270 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
271 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
272};
273
274static const struct gpio_led
275bcm47xx_leds_linksys_wrt150nv11[] __initconst = {
276 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
277 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
278 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
279};
280
281static const struct gpio_led
282bcm47xx_leds_linksys_wrt160nv1[] __initconst = {
283 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
284 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
285 BCM47XX_GPIO_LED(5, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
286};
287
288static const struct gpio_led
289bcm47xx_leds_linksys_wrt160nv3[] __initconst = {
290 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
291 BCM47XX_GPIO_LED(2, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
292 BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
293};
294
295static const struct gpio_led
Rafał Miłecki160f1432015-04-01 18:18:02 +0200296bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
297 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
298 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
299 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
300};
301
302static const struct gpio_led
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100303bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
304 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
305 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
306 BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
307};
308
309static const struct gpio_led
310bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
311 BCM47XX_GPIO_LED(1, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
312 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
313 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
314};
315
316static const struct gpio_led
Rafał Miłecki41a867c2014-06-20 07:56:39 +0200317bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100318 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
319 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
320 BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
321 BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
322};
323
324static const struct gpio_led
325bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
326 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
327 BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
328 BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
329};
330
Rafał Miłecki7bb26b12014-06-20 07:56:40 +0200331/* Verified on: WRT54GS V1.0 */
332static const struct gpio_led
333bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
Mirko Parthey56a46ac2017-05-18 21:30:03 +0200334 BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
Rafał Miłecki7bb26b12014-06-20 07:56:40 +0200335 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
336 BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
337};
338
Rafał Miłecki9194b342014-07-17 23:24:30 +0200339/* Verified on: WRT54GL V1.1 */
340static const struct gpio_led
341bcm47xx_leds_linksys_wrt54g_type_0467[] __initconst = {
342 BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
343 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
344 BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
345 BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
346 BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
347};
348
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100349static const struct gpio_led
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100350bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
351 BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
352 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
353 BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
354 BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
355};
356
357static const struct gpio_led
358bcm47xx_leds_linksys_wrt610nv2[] __initconst = {
359 BCM47XX_GPIO_LED(0, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
360 BCM47XX_GPIO_LED(1, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
361 BCM47XX_GPIO_LED(3, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
362 BCM47XX_GPIO_LED(5, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
363 BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
364};
365
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100366static const struct gpio_led
367bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
Rafał Miłecki9194b342014-07-17 23:24:30 +0200368 BCM47XX_GPIO_LED(0, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
369 BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
370 BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
371 BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100372};
373
Dan Haab24f29702015-04-22 13:58:33 -0600374/* Luxul */
375
376static const struct gpio_led
Dan Haabe7093052017-01-23 12:50:38 -0700377bcm47xx_leds_luxul_abr_4400_v1[] __initconst = {
378 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
379 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
380};
381
382static const struct gpio_led
383bcm47xx_leds_luxul_xap_310_v1[] __initconst = {
384 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
385};
386
387static const struct gpio_led
388bcm47xx_leds_luxul_xap_1210_v1[] __initconst = {
389 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
390};
391
392static const struct gpio_led
393bcm47xx_leds_luxul_xap_1230_v1[] __initconst = {
394 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
395 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
396 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
397};
398
399static const struct gpio_led
400bcm47xx_leds_luxul_xap_1240_v1[] __initconst = {
401 BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
402 BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
403 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
404};
405
406static const struct gpio_led
407bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
408 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
409};
410
411static const struct gpio_led
Dan Haab27264122018-03-27 11:24:34 -0600412bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = {
413 BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
414 BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
415};
416
417static const struct gpio_led
Dan Haabe7093052017-01-23 12:50:38 -0700418bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
419 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
420 BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
421};
422
423static const struct gpio_led
424bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = {
425 BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"),
426 BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
427};
428
429static const struct gpio_led
430bcm47xx_leds_luxul_xwr_600_v1[] __initconst = {
431 BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
432 BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
433 BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
434};
435
436static const struct gpio_led
Dan Haab24f29702015-04-22 13:58:33 -0600437bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
438 BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
439 BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
440 BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 0, "timer"),
441 BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
442};
443
Dan Haab27264122018-03-27 11:24:34 -0600444static const struct gpio_led
445bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
446 BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
447};
448
Hauke Mehrtens250dc032014-07-29 00:12:09 +0200449/* Microsoft */
450
451static const struct gpio_led
452bcm47xx_leds_microsoft_nm700[] __initconst = {
453 BCM47XX_GPIO_LED(6, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
454};
455
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100456/* Motorola */
457
458static const struct gpio_led
459bcm47xx_leds_motorola_we800g[] __initconst = {
460 BCM47XX_GPIO_LED(1, "amber", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
461 BCM47XX_GPIO_LED(2, "unk", "unk", 1, LEDS_GPIO_DEFSTATE_OFF), /* There are only 3 LEDs: Power, Wireless and Device (ethernet) */
462 BCM47XX_GPIO_LED(4, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
463};
464
465static const struct gpio_led
466bcm47xx_leds_motorola_wr850gp[] __initconst = {
467 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
468 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
469 BCM47XX_GPIO_LED(6, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
470 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
471};
472
473static const struct gpio_led
474bcm47xx_leds_motorola_wr850gv2v3[] __initconst = {
475 BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
476 BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
477 BCM47XX_GPIO_LED(7, "unk", "diag", 1, LEDS_GPIO_DEFSTATE_OFF),
478};
479
480/* Netgear */
481
482static const struct gpio_led
483bcm47xx_leds_netgear_wndr3400v1[] __initconst = {
484 BCM47XX_GPIO_LED(2, "green", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
485 BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
486 BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
487};
488
Rafał Miłecki515fa752014-01-14 12:14:41 +0100489static const struct gpio_led
Rafał Miłeckie7277e12014-01-03 09:37:42 +0100490bcm47xx_leds_netgear_wndr4500v1[] __initconst = {
491 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
492 BCM47XX_GPIO_LED(2, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
493 BCM47XX_GPIO_LED(3, "amber", "power", 1, LEDS_GPIO_DEFSTATE_OFF),
494 BCM47XX_GPIO_LED(8, "green", "usb1", 1, LEDS_GPIO_DEFSTATE_OFF),
495 BCM47XX_GPIO_LED(9, "green", "2ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
496 BCM47XX_GPIO_LED(11, "blue", "5ghz", 1, LEDS_GPIO_DEFSTATE_OFF),
497 BCM47XX_GPIO_LED(14, "green", "usb2", 1, LEDS_GPIO_DEFSTATE_OFF),
Rafał Miłecki515fa752014-01-14 12:14:41 +0100498};
499
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100500static const struct gpio_led
Rafał Miłecki9194b342014-07-17 23:24:30 +0200501bcm47xx_leds_netgear_wnr3500lv1[] __initconst = {
502 BCM47XX_GPIO_LED(0, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
503 BCM47XX_GPIO_LED(1, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
504 BCM47XX_GPIO_LED(2, "green", "wan", 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
509static const struct gpio_led
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100510bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
511 BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
512 BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
513 BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
514};
515
Hauke Mehrtensd508eb72014-03-02 17:49:28 +0100516/* Siemens */
517static const struct gpio_led
518bcm47xx_leds_siemens_se505v2[] __initconst = {
519 BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
520 BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
521 BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
522};
523
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100524/* SimpleTech */
525
526static const struct gpio_led
527bcm47xx_leds_simpletech_simpleshare[] __initconst = {
528 BCM47XX_GPIO_LED(1, "unk", "status", 1, LEDS_GPIO_DEFSTATE_OFF), /* "Ready" LED */
529};
530
531/**************************************************
532 * Init
533 **************************************************/
534
Rafał Miłecki515fa752014-01-14 12:14:41 +0100535static struct gpio_led_platform_data bcm47xx_leds_pdata;
536
537#define bcm47xx_set_pdata(dev_leds) do { \
538 bcm47xx_leds_pdata.leds = dev_leds; \
539 bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
540} while (0)
541
Dan Haab27264122018-03-27 11:24:34 -0600542static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
543#define bcm47xx_set_pdata_extra(dev_leds) do { \
544 bcm47xx_leds_pdata_extra.leds = dev_leds; \
545 bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \
546} while (0)
547
Rafał Miłecki515fa752014-01-14 12:14:41 +0100548void __init bcm47xx_leds_register(void)
549{
550 enum bcm47xx_board board = bcm47xx_board_get();
551
552 switch (board) {
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100553 case BCM47XX_BOARD_ASUS_RTN12:
554 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
555 break;
Rafał Miłecki9194b342014-07-17 23:24:30 +0200556 case BCM47XX_BOARD_ASUS_RTN15U:
557 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn15u);
558 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100559 case BCM47XX_BOARD_ASUS_RTN16:
560 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn16);
561 break;
562 case BCM47XX_BOARD_ASUS_RTN66U:
563 bcm47xx_set_pdata(bcm47xx_leds_asus_rtn66u);
564 break;
565 case BCM47XX_BOARD_ASUS_WL300G:
566 bcm47xx_set_pdata(bcm47xx_leds_asus_wl300g);
567 break;
568 case BCM47XX_BOARD_ASUS_WL320GE:
569 bcm47xx_set_pdata(bcm47xx_leds_asus_wl320ge);
570 break;
571 case BCM47XX_BOARD_ASUS_WL330GE:
572 bcm47xx_set_pdata(bcm47xx_leds_asus_wl330ge);
573 break;
Hauke Mehrtens250dc032014-07-29 00:12:09 +0200574 case BCM47XX_BOARD_ASUS_WL500G:
575 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500g);
576 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100577 case BCM47XX_BOARD_ASUS_WL500GD:
578 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gd);
579 break;
580 case BCM47XX_BOARD_ASUS_WL500GPV1:
581 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv1);
582 break;
583 case BCM47XX_BOARD_ASUS_WL500GPV2:
584 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500gpv2);
585 break;
586 case BCM47XX_BOARD_ASUS_WL500W:
587 bcm47xx_set_pdata(bcm47xx_leds_asus_wl500w);
588 break;
589 case BCM47XX_BOARD_ASUS_WL520GC:
590 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gc);
591 break;
592 case BCM47XX_BOARD_ASUS_WL520GU:
593 bcm47xx_set_pdata(bcm47xx_leds_asus_wl520gu);
594 break;
595 case BCM47XX_BOARD_ASUS_WL700GE:
596 bcm47xx_set_pdata(bcm47xx_leds_asus_wl700ge);
597 break;
598 case BCM47XX_BOARD_ASUS_WLHDD:
599 bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd);
600 break;
601
Cody P Schafer0dae62e2014-03-02 17:49:29 +0100602 case BCM47XX_BOARD_BELKIN_F7D3301:
603 case BCM47XX_BOARD_BELKIN_F7D3302:
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100604 case BCM47XX_BOARD_BELKIN_F7D4301:
Cody P Schafer0dae62e2014-03-02 17:49:29 +0100605 case BCM47XX_BOARD_BELKIN_F7D4302:
606 case BCM47XX_BOARD_BELKIN_F7D4401:
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100607 bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301);
608 break;
609
610 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54:
611 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr2_a54g54);
612 break;
613 case BCM47XX_BOARD_BUFFALO_WHR_G125:
614 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g125);
615 break;
616 case BCM47XX_BOARD_BUFFALO_WHR_G54S:
617 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_g54s);
618 break;
619 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54:
620 bcm47xx_set_pdata(bcm47xx_leds_buffalo_whr_hp_g54);
621 break;
622 case BCM47XX_BOARD_BUFFALO_WZR_G300N:
623 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_g300n);
624 break;
625 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54:
626 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54);
627 break;
628 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP:
629 bcm47xx_set_pdata(bcm47xx_leds_buffalo_wzr_rs_g54hp);
630 break;
631
632 case BCM47XX_BOARD_DELL_TM2300:
633 bcm47xx_set_pdata(bcm47xx_leds_dell_tm2300);
634 break;
635
636 case BCM47XX_BOARD_DLINK_DIR130:
637 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir130);
638 break;
639 case BCM47XX_BOARD_DLINK_DIR330:
640 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
641 break;
642
643 case BCM47XX_BOARD_HUAWEI_E970:
644 bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
645 break;
646
647 case BCM47XX_BOARD_LINKSYS_E1000V1:
648 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v1);
649 break;
650 case BCM47XX_BOARD_LINKSYS_E1000V21:
651 bcm47xx_set_pdata(bcm47xx_leds_linksys_e1000v21);
652 break;
653 case BCM47XX_BOARD_LINKSYS_E2000V1:
654 bcm47xx_set_pdata(bcm47xx_leds_linksys_e2000v1);
655 break;
656 case BCM47XX_BOARD_LINKSYS_E3000V1:
657 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3000v1);
658 break;
659 case BCM47XX_BOARD_LINKSYS_E3200V1:
660 bcm47xx_set_pdata(bcm47xx_leds_linksys_e3200v1);
661 break;
662 case BCM47XX_BOARD_LINKSYS_E4200V1:
663 bcm47xx_set_pdata(bcm47xx_leds_linksys_e4200v1);
664 break;
665 case BCM47XX_BOARD_LINKSYS_WRT150NV1:
666 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv1);
667 break;
668 case BCM47XX_BOARD_LINKSYS_WRT150NV11:
669 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt150nv11);
670 break;
671 case BCM47XX_BOARD_LINKSYS_WRT160NV1:
672 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv1);
673 break;
674 case BCM47XX_BOARD_LINKSYS_WRT160NV3:
675 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
676 break;
Rafał Miłecki160f1432015-04-01 18:18:02 +0200677 case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
678 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
679 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100680 case BCM47XX_BOARD_LINKSYS_WRT300NV11:
681 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
682 break;
683 case BCM47XX_BOARD_LINKSYS_WRT310NV1:
684 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
685 break;
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100686 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
687 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
688 break;
Rafał Miłecki41a867c2014-06-20 07:56:39 +0200689 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101:
Rafał Miłecki7bb26b12014-06-20 07:56:40 +0200690 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0101);
691 break;
Rafał Miłecki41a867c2014-06-20 07:56:39 +0200692 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467:
Rafał Miłecki9194b342014-07-17 23:24:30 +0200693 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_type_0467);
694 break;
Rafał Miłecki41a867c2014-06-20 07:56:39 +0200695 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708:
696 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g_generic);
697 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100698 case BCM47XX_BOARD_LINKSYS_WRT610NV1:
699 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
700 break;
701 case BCM47XX_BOARD_LINKSYS_WRT610NV2:
702 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2);
703 break;
Hauke Mehrtens96c10de2014-03-02 17:49:27 +0100704 case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
705 bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
706 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100707
Dan Haabe7093052017-01-23 12:50:38 -0700708 case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
709 bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1);
710 break;
711 case BCM47XX_BOARD_LUXUL_XAP_310_V1:
712 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1);
713 break;
714 case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
715 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1);
716 break;
717 case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
718 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1);
719 break;
720 case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
721 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1);
722 break;
723 case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
724 bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
Dan Haab27264122018-03-27 11:24:34 -0600725 bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
Dan Haabe7093052017-01-23 12:50:38 -0700726 break;
727 case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
728 bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
729 break;
730 case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
731 bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1);
732 break;
733 case BCM47XX_BOARD_LUXUL_XWR_600_V1:
734 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1);
735 break;
Dan Haab24f29702015-04-22 13:58:33 -0600736 case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
737 bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
Dan Haab27264122018-03-27 11:24:34 -0600738 bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
Dan Haab24f29702015-04-22 13:58:33 -0600739 break;
740
Hauke Mehrtens250dc032014-07-29 00:12:09 +0200741 case BCM47XX_BOARD_MICROSOFT_MN700:
742 bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700);
743 break;
744
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100745 case BCM47XX_BOARD_MOTOROLA_WE800G:
746 bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
747 break;
748 case BCM47XX_BOARD_MOTOROLA_WR850GP:
749 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gp);
750 break;
751 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3:
752 bcm47xx_set_pdata(bcm47xx_leds_motorola_wr850gv2v3);
753 break;
754
755 case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
756 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr3400v1);
757 break;
Rafał Miłecki515fa752014-01-14 12:14:41 +0100758 case BCM47XX_BOARD_NETGEAR_WNDR4500V1:
Rafał Miłeckie7277e12014-01-03 09:37:42 +0100759 bcm47xx_set_pdata(bcm47xx_leds_netgear_wndr4500v1);
Rafał Miłecki515fa752014-01-14 12:14:41 +0100760 break;
Rafał Miłecki9194b342014-07-17 23:24:30 +0200761 case BCM47XX_BOARD_NETGEAR_WNR3500L:
762 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
763 break;
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100764 case BCM47XX_BOARD_NETGEAR_WNR834BV2:
765 bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
766 break;
767
Hauke Mehrtensd508eb72014-03-02 17:49:28 +0100768 case BCM47XX_BOARD_SIEMENS_SE505V2:
769 bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
770 break;
771
Rafał Miłecki2d0816d2014-01-02 12:32:57 +0100772 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
773 bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
774 break;
775
Rafał Miłecki515fa752014-01-14 12:14:41 +0100776 default:
777 pr_debug("No LEDs configuration found for this device\n");
778 return;
779 }
780
781 gpio_led_register_device(-1, &bcm47xx_leds_pdata);
Dan Haab27264122018-03-27 11:24:34 -0600782 if (bcm47xx_leds_pdata_extra.num_leds)
783 gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
Rafał Miłecki515fa752014-01-14 12:14:41 +0100784}