1 // SPDX-License-Identifier: GPL-2.0
2 #include "bcm47xx_private.h"
4 #include <linux/input.h>
5 #include <linux/gpio_keys.h>
6 #include <linux/interrupt.h>
7 #include <bcm47xx_board.h>
10 /**************************************************
12 **************************************************/
14 #define BCM47XX_GPIO_KEY(_gpio, _code) \
21 #define BCM47XX_GPIO_KEY_H(_gpio, _code) \
29 static const struct gpio_keys_button
30 bcm47xx_buttons_asus_rtn12
[] __initconst
= {
31 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
32 BCM47XX_GPIO_KEY(1, KEY_RESTART
),
33 BCM47XX_GPIO_KEY(4, BTN_0
), /* Router mode */
34 BCM47XX_GPIO_KEY(5, BTN_1
), /* Repeater mode */
35 BCM47XX_GPIO_KEY(6, BTN_2
), /* AP mode */
38 static const struct gpio_keys_button
39 bcm47xx_buttons_asus_rtn16
[] __initconst
= {
40 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
41 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
44 static const struct gpio_keys_button
45 bcm47xx_buttons_asus_rtn66u
[] __initconst
= {
46 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
47 BCM47XX_GPIO_KEY(9, KEY_RESTART
),
50 static const struct gpio_keys_button
51 bcm47xx_buttons_asus_wl300g
[] __initconst
= {
52 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
55 static const struct gpio_keys_button
56 bcm47xx_buttons_asus_wl320ge
[] __initconst
= {
57 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
60 static const struct gpio_keys_button
61 bcm47xx_buttons_asus_wl330ge
[] __initconst
= {
62 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
65 static const struct gpio_keys_button
66 bcm47xx_buttons_asus_wl500g
[] __initconst
= {
67 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
70 static const struct gpio_keys_button
71 bcm47xx_buttons_asus_wl500gd
[] __initconst
= {
72 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
75 static const struct gpio_keys_button
76 bcm47xx_buttons_asus_wl500gpv1
[] __initconst
= {
77 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
78 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
81 static const struct gpio_keys_button
82 bcm47xx_buttons_asus_wl500gpv2
[] __initconst
= {
83 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
84 BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON
),
87 static const struct gpio_keys_button
88 bcm47xx_buttons_asus_wl500w
[] __initconst
= {
89 BCM47XX_GPIO_KEY_H(6, KEY_RESTART
),
90 BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON
),
93 static const struct gpio_keys_button
94 bcm47xx_buttons_asus_wl520gc
[] __initconst
= {
95 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
96 BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON
),
99 static const struct gpio_keys_button
100 bcm47xx_buttons_asus_wl520gu
[] __initconst
= {
101 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
102 BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON
),
105 static const struct gpio_keys_button
106 bcm47xx_buttons_asus_wl700ge
[] __initconst
= {
107 BCM47XX_GPIO_KEY(0, KEY_POWER
), /* Hard disk power switch */
108 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
), /* EZSetup */
109 BCM47XX_GPIO_KEY(6, KEY_COPY
), /* Copy data from USB to internal disk */
110 BCM47XX_GPIO_KEY(7, KEY_RESTART
), /* Hard reset */
113 static const struct gpio_keys_button
114 bcm47xx_buttons_asus_wlhdd
[] __initconst
= {
115 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
120 static const struct gpio_keys_button
121 bcm47xx_buttons_huawei_e970
[] __initconst
= {
122 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
127 static const struct gpio_keys_button
128 bcm47xx_buttons_belkin_f7d4301
[] __initconst
= {
129 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
130 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
135 static const struct gpio_keys_button
136 bcm47xx_buttons_buffalo_whr2_a54g54
[] __initconst
= {
137 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
140 static const struct gpio_keys_button
141 bcm47xx_buttons_buffalo_whr_g125
[] __initconst
= {
142 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
143 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
144 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode swtich */
147 static const struct gpio_keys_button
148 bcm47xx_buttons_buffalo_whr_g54s
[] __initconst
= {
149 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
150 BCM47XX_GPIO_KEY_H(4, KEY_RESTART
),
151 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode swtich */
154 static const struct gpio_keys_button
155 bcm47xx_buttons_buffalo_whr_hp_g54
[] __initconst
= {
156 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
157 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
158 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode swtich */
161 static const struct gpio_keys_button
162 bcm47xx_buttons_buffalo_wzr_g300n
[] __initconst
= {
163 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
166 static const struct gpio_keys_button
167 bcm47xx_buttons_buffalo_wzr_rs_g54
[] __initconst
= {
168 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
169 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
172 static const struct gpio_keys_button
173 bcm47xx_buttons_buffalo_wzr_rs_g54hp
[] __initconst
= {
174 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
175 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
180 static const struct gpio_keys_button
181 bcm47xx_buttons_dell_tm2300
[] __initconst
= {
182 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
187 static const struct gpio_keys_button
188 bcm47xx_buttons_dlink_dir130
[] __initconst
= {
189 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
190 BCM47XX_GPIO_KEY(7, KEY_UNKNOWN
),
193 static const struct gpio_keys_button
194 bcm47xx_buttons_dlink_dir330
[] __initconst
= {
195 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
196 BCM47XX_GPIO_KEY(7, KEY_UNKNOWN
),
201 static const struct gpio_keys_button
202 bcm47xx_buttons_linksys_e1000v1
[] __initconst
= {
203 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
204 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
207 static const struct gpio_keys_button
208 bcm47xx_buttons_linksys_e1000v21
[] __initconst
= {
209 BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON
),
210 BCM47XX_GPIO_KEY(10, KEY_RESTART
),
213 static const struct gpio_keys_button
214 bcm47xx_buttons_linksys_e2000v1
[] __initconst
= {
215 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
216 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
219 static const struct gpio_keys_button
220 bcm47xx_buttons_linksys_e3000v1
[] __initconst
= {
221 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
222 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
225 static const struct gpio_keys_button
226 bcm47xx_buttons_linksys_e3200v1
[] __initconst
= {
227 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
228 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
231 static const struct gpio_keys_button
232 bcm47xx_buttons_linksys_e4200v1
[] __initconst
= {
233 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
234 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
237 static const struct gpio_keys_button
238 bcm47xx_buttons_linksys_wrt150nv1
[] __initconst
= {
239 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
240 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
243 static const struct gpio_keys_button
244 bcm47xx_buttons_linksys_wrt150nv11
[] __initconst
= {
245 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
246 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
249 static const struct gpio_keys_button
250 bcm47xx_buttons_linksys_wrt160nv1
[] __initconst
= {
251 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
252 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
255 static const struct gpio_keys_button
256 bcm47xx_buttons_linksys_wrt160nv3
[] __initconst
= {
257 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
258 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
261 static const struct gpio_keys_button
262 bcm47xx_buttons_linksys_wrt300n_v1
[] __initconst
= {
263 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
264 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
267 static const struct gpio_keys_button
268 bcm47xx_buttons_linksys_wrt300nv11
[] __initconst
= {
269 BCM47XX_GPIO_KEY(4, KEY_UNKNOWN
),
270 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
273 static const struct gpio_keys_button
274 bcm47xx_buttons_linksys_wrt310nv1
[] __initconst
= {
275 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
276 BCM47XX_GPIO_KEY(8, KEY_UNKNOWN
),
279 static const struct gpio_keys_button
280 bcm47xx_buttons_linksys_wrt54g3gv2
[] __initconst
= {
281 BCM47XX_GPIO_KEY(5, KEY_WIMAX
),
282 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
285 static const struct gpio_keys_button
286 bcm47xx_buttons_linksys_wrt54g_generic
[] __initconst
= {
287 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
288 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
291 static const struct gpio_keys_button
292 bcm47xx_buttons_linksys_wrt610nv1
[] __initconst
= {
293 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
294 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
297 static const struct gpio_keys_button
298 bcm47xx_buttons_linksys_wrt610nv2
[] __initconst
= {
299 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
300 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
303 static const struct gpio_keys_button
304 bcm47xx_buttons_linksys_wrtsl54gs
[] __initconst
= {
305 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
306 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
311 static const struct gpio_keys_button
312 bcm47xx_buttons_luxul_abr_4400_v1
[] = {
313 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
316 static const struct gpio_keys_button
317 bcm47xx_buttons_luxul_xap_310_v1
[] = {
318 BCM47XX_GPIO_KEY(20, KEY_RESTART
),
321 static const struct gpio_keys_button
322 bcm47xx_buttons_luxul_xap_1210_v1
[] = {
323 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
326 static const struct gpio_keys_button
327 bcm47xx_buttons_luxul_xap_1230_v1
[] = {
328 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
331 static const struct gpio_keys_button
332 bcm47xx_buttons_luxul_xap_1240_v1
[] = {
333 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
336 static const struct gpio_keys_button
337 bcm47xx_buttons_luxul_xap_1500_v1
[] = {
338 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
341 static const struct gpio_keys_button
342 bcm47xx_buttons_luxul_xbr_4400_v1
[] = {
343 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
346 static const struct gpio_keys_button
347 bcm47xx_buttons_luxul_xvw_p30_v1
[] = {
348 BCM47XX_GPIO_KEY(20, KEY_RESTART
),
351 static const struct gpio_keys_button
352 bcm47xx_buttons_luxul_xwr_600_v1
[] = {
353 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
356 static const struct gpio_keys_button
357 bcm47xx_buttons_luxul_xwr_1750_v1
[] = {
358 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
363 static const struct gpio_keys_button
364 bcm47xx_buttons_microsoft_nm700
[] __initconst
= {
365 BCM47XX_GPIO_KEY(7, KEY_RESTART
),
370 static const struct gpio_keys_button
371 bcm47xx_buttons_motorola_we800g
[] __initconst
= {
372 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
375 static const struct gpio_keys_button
376 bcm47xx_buttons_motorola_wr850gp
[] __initconst
= {
377 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
380 static const struct gpio_keys_button
381 bcm47xx_buttons_motorola_wr850gv2v3
[] __initconst
= {
382 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
387 static const struct gpio_keys_button
388 bcm47xx_buttons_netgear_r6200_v1
[] __initconst
= {
389 BCM47XX_GPIO_KEY(2, KEY_RFKILL
),
390 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
391 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
394 static const struct gpio_keys_button
395 bcm47xx_buttons_netgear_wndr3400v1
[] __initconst
= {
396 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
397 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
398 BCM47XX_GPIO_KEY(8, KEY_RFKILL
),
401 static const struct gpio_keys_button
402 bcm47xx_buttons_netgear_wndr3400_v3
[] __initconst
= {
403 BCM47XX_GPIO_KEY(12, KEY_RESTART
),
404 BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON
),
407 static const struct gpio_keys_button
408 bcm47xx_buttons_netgear_wndr3700v3
[] __initconst
= {
409 BCM47XX_GPIO_KEY(2, KEY_RFKILL
),
410 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
411 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
414 static const struct gpio_keys_button
415 bcm47xx_buttons_netgear_wndr4500v1
[] __initconst
= {
416 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
417 BCM47XX_GPIO_KEY(5, KEY_RFKILL
),
418 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
421 static const struct gpio_keys_button
422 bcm47xx_buttons_netgear_wnr1000_v3
[] __initconst
= {
423 BCM47XX_GPIO_KEY(2, KEY_WPS_BUTTON
),
424 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
427 static const struct gpio_keys_button
428 bcm47xx_buttons_netgear_wnr3500lv1
[] __initconst
= {
429 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
430 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
433 static const struct gpio_keys_button
434 bcm47xx_buttons_netgear_wnr834bv2
[] __initconst
= {
435 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
440 static const struct gpio_keys_button
441 bcm47xx_buttons_simpletech_simpleshare
[] __initconst
= {
442 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
445 /**************************************************
447 **************************************************/
449 static struct gpio_keys_platform_data bcm47xx_button_pdata
;
451 static struct platform_device bcm47xx_buttons_gpio_keys
= {
454 .platform_data
= &bcm47xx_button_pdata
,
458 /* Copy data from __initconst */
459 static int __init
bcm47xx_buttons_copy(const struct gpio_keys_button
*buttons
,
462 size_t size
= nbuttons
* sizeof(*buttons
);
464 bcm47xx_button_pdata
.buttons
= kmemdup(buttons
, size
, GFP_KERNEL
);
465 if (!bcm47xx_button_pdata
.buttons
)
467 bcm47xx_button_pdata
.nbuttons
= nbuttons
;
472 #define bcm47xx_copy_bdata(dev_buttons) \
473 bcm47xx_buttons_copy(dev_buttons, ARRAY_SIZE(dev_buttons));
475 int __init
bcm47xx_buttons_register(void)
477 enum bcm47xx_board board
= bcm47xx_board_get();
481 case BCM47XX_BOARD_ASUS_RTN12
:
482 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12
);
484 case BCM47XX_BOARD_ASUS_RTN16
:
485 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn16
);
487 case BCM47XX_BOARD_ASUS_RTN66U
:
488 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn66u
);
490 case BCM47XX_BOARD_ASUS_WL300G
:
491 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl300g
);
493 case BCM47XX_BOARD_ASUS_WL320GE
:
494 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl320ge
);
496 case BCM47XX_BOARD_ASUS_WL330GE
:
497 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl330ge
);
499 case BCM47XX_BOARD_ASUS_WL500G
:
500 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500g
);
502 case BCM47XX_BOARD_ASUS_WL500GD
:
503 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gd
);
505 case BCM47XX_BOARD_ASUS_WL500GPV1
:
506 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gpv1
);
508 case BCM47XX_BOARD_ASUS_WL500GPV2
:
509 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gpv2
);
511 case BCM47XX_BOARD_ASUS_WL500W
:
512 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500w
);
514 case BCM47XX_BOARD_ASUS_WL520GC
:
515 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl520gc
);
517 case BCM47XX_BOARD_ASUS_WL520GU
:
518 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl520gu
);
520 case BCM47XX_BOARD_ASUS_WL700GE
:
521 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl700ge
);
523 case BCM47XX_BOARD_ASUS_WLHDD
:
524 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd
);
527 case BCM47XX_BOARD_BELKIN_F7D3301
:
528 case BCM47XX_BOARD_BELKIN_F7D3302
:
529 case BCM47XX_BOARD_BELKIN_F7D4301
:
530 case BCM47XX_BOARD_BELKIN_F7D4302
:
531 case BCM47XX_BOARD_BELKIN_F7D4401
:
532 err
= bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301
);
535 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54
:
536 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr2_a54g54
);
538 case BCM47XX_BOARD_BUFFALO_WHR_G125
:
539 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_g125
);
541 case BCM47XX_BOARD_BUFFALO_WHR_G54S
:
542 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_g54s
);
544 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54
:
545 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_hp_g54
);
547 case BCM47XX_BOARD_BUFFALO_WZR_G300N
:
548 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_g300n
);
550 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54
:
551 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_rs_g54
);
553 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP
:
554 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_rs_g54hp
);
557 case BCM47XX_BOARD_DELL_TM2300
:
558 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dell_tm2300
);
561 case BCM47XX_BOARD_DLINK_DIR130
:
562 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dlink_dir130
);
564 case BCM47XX_BOARD_DLINK_DIR330
:
565 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dlink_dir330
);
568 case BCM47XX_BOARD_HUAWEI_E970
:
569 err
= bcm47xx_copy_bdata(bcm47xx_buttons_huawei_e970
);
572 case BCM47XX_BOARD_LINKSYS_E1000V1
:
573 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e1000v1
);
575 case BCM47XX_BOARD_LINKSYS_E1000V21
:
576 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e1000v21
);
578 case BCM47XX_BOARD_LINKSYS_E2000V1
:
579 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1
);
581 case BCM47XX_BOARD_LINKSYS_E3000V1
:
582 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1
);
584 case BCM47XX_BOARD_LINKSYS_E3200V1
:
585 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3200v1
);
587 case BCM47XX_BOARD_LINKSYS_E4200V1
:
588 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e4200v1
);
590 case BCM47XX_BOARD_LINKSYS_WRT150NV1
:
591 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt150nv1
);
593 case BCM47XX_BOARD_LINKSYS_WRT150NV11
:
594 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt150nv11
);
596 case BCM47XX_BOARD_LINKSYS_WRT160NV1
:
597 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv1
);
599 case BCM47XX_BOARD_LINKSYS_WRT160NV3
:
600 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3
);
602 case BCM47XX_BOARD_LINKSYS_WRT300N_V1
:
603 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300n_v1
);
605 case BCM47XX_BOARD_LINKSYS_WRT300NV11
:
606 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11
);
608 case BCM47XX_BOARD_LINKSYS_WRT310NV1
:
609 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1
);
611 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2
:
612 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2
);
614 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101
:
615 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467
:
616 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708
:
617 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g_generic
);
619 case BCM47XX_BOARD_LINKSYS_WRT610NV1
:
620 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1
);
622 case BCM47XX_BOARD_LINKSYS_WRT610NV2
:
623 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2
);
625 case BCM47XX_BOARD_LINKSYS_WRTSL54GS
:
626 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs
);
629 case BCM47XX_BOARD_LUXUL_ABR_4400_V1
:
630 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_abr_4400_v1
);
632 case BCM47XX_BOARD_LUXUL_XAP_310_V1
:
633 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_310_v1
);
635 case BCM47XX_BOARD_LUXUL_XAP_1210_V1
:
636 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1210_v1
);
638 case BCM47XX_BOARD_LUXUL_XAP_1230_V1
:
639 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1230_v1
);
641 case BCM47XX_BOARD_LUXUL_XAP_1240_V1
:
642 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1240_v1
);
644 case BCM47XX_BOARD_LUXUL_XAP_1500_V1
:
645 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1500_v1
);
647 case BCM47XX_BOARD_LUXUL_XBR_4400_V1
:
648 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xbr_4400_v1
);
650 case BCM47XX_BOARD_LUXUL_XVW_P30_V1
:
651 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xvw_p30_v1
);
653 case BCM47XX_BOARD_LUXUL_XWR_600_V1
:
654 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_600_v1
);
656 case BCM47XX_BOARD_LUXUL_XWR_1750_V1
:
657 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1
);
660 case BCM47XX_BOARD_MICROSOFT_MN700
:
661 err
= bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700
);
664 case BCM47XX_BOARD_MOTOROLA_WE800G
:
665 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g
);
667 case BCM47XX_BOARD_MOTOROLA_WR850GP
:
668 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gp
);
670 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3
:
671 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3
);
674 case BCM47XX_BOARD_NETGEAR_R6200_V1
:
675 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1
);
677 case BCM47XX_BOARD_NETGEAR_WNDR3400V1
:
678 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1
);
680 case BCM47XX_BOARD_NETGEAR_WNDR3400_V3
:
681 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3
);
683 case BCM47XX_BOARD_NETGEAR_WNDR3700V3
:
684 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3
);
686 case BCM47XX_BOARD_NETGEAR_WNDR4500V1
:
687 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1
);
689 case BCM47XX_BOARD_NETGEAR_WNR1000_V3
:
690 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr1000_v3
);
692 case BCM47XX_BOARD_NETGEAR_WNR3500L
:
693 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1
);
695 case BCM47XX_BOARD_NETGEAR_WNR834BV2
:
696 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2
);
699 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE
:
700 err
= bcm47xx_copy_bdata(bcm47xx_buttons_simpletech_simpleshare
);
704 pr_debug("No buttons configuration found for this device\n");
711 err
= platform_device_register(&bcm47xx_buttons_gpio_keys
);
713 pr_err("Failed to register platform device: %d\n", err
);