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_rtn10u
[] __initconst
= {
31 BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON
),
32 BCM47XX_GPIO_KEY(21, KEY_RESTART
),
35 static const struct gpio_keys_button
36 bcm47xx_buttons_asus_rtn12
[] __initconst
= {
37 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
38 BCM47XX_GPIO_KEY(1, KEY_RESTART
),
39 BCM47XX_GPIO_KEY(4, BTN_0
), /* Router mode */
40 BCM47XX_GPIO_KEY(5, BTN_1
), /* Repeater mode */
41 BCM47XX_GPIO_KEY(6, BTN_2
), /* AP mode */
44 static const struct gpio_keys_button
45 bcm47xx_buttons_asus_rtn16
[] __initconst
= {
46 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
47 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
50 static const struct gpio_keys_button
51 bcm47xx_buttons_asus_rtn66u
[] __initconst
= {
52 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
53 BCM47XX_GPIO_KEY(9, KEY_RESTART
),
56 static const struct gpio_keys_button
57 bcm47xx_buttons_asus_wl300g
[] __initconst
= {
58 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
61 static const struct gpio_keys_button
62 bcm47xx_buttons_asus_wl320ge
[] __initconst
= {
63 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
66 static const struct gpio_keys_button
67 bcm47xx_buttons_asus_wl330ge
[] __initconst
= {
68 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
71 static const struct gpio_keys_button
72 bcm47xx_buttons_asus_wl500g
[] __initconst
= {
73 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
76 static const struct gpio_keys_button
77 bcm47xx_buttons_asus_wl500gd
[] __initconst
= {
78 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
81 static const struct gpio_keys_button
82 bcm47xx_buttons_asus_wl500gpv1
[] __initconst
= {
83 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
84 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
87 static const struct gpio_keys_button
88 bcm47xx_buttons_asus_wl500gpv2
[] __initconst
= {
89 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
90 BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON
),
93 static const struct gpio_keys_button
94 bcm47xx_buttons_asus_wl500w
[] __initconst
= {
95 BCM47XX_GPIO_KEY_H(6, KEY_RESTART
),
96 BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON
),
99 static const struct gpio_keys_button
100 bcm47xx_buttons_asus_wl520gc
[] __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_wl520gu
[] __initconst
= {
107 BCM47XX_GPIO_KEY(2, KEY_RESTART
),
108 BCM47XX_GPIO_KEY(3, KEY_WPS_BUTTON
),
111 static const struct gpio_keys_button
112 bcm47xx_buttons_asus_wl700ge
[] __initconst
= {
113 BCM47XX_GPIO_KEY(0, KEY_POWER
), /* Hard disk power switch */
114 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
), /* EZSetup */
115 BCM47XX_GPIO_KEY(6, KEY_COPY
), /* Copy data from USB to internal disk */
116 BCM47XX_GPIO_KEY(7, KEY_RESTART
), /* Hard reset */
119 static const struct gpio_keys_button
120 bcm47xx_buttons_asus_wlhdd
[] __initconst
= {
121 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
126 static const struct gpio_keys_button
127 bcm47xx_buttons_huawei_e970
[] __initconst
= {
128 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
133 static const struct gpio_keys_button
134 bcm47xx_buttons_belkin_f7d4301
[] __initconst
= {
135 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
136 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
141 static const struct gpio_keys_button
142 bcm47xx_buttons_buffalo_whr2_a54g54
[] __initconst
= {
143 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
146 static const struct gpio_keys_button
147 bcm47xx_buttons_buffalo_whr_g125
[] __initconst
= {
148 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
149 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
150 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode switch */
153 static const struct gpio_keys_button
154 bcm47xx_buttons_buffalo_whr_g54s
[] __initconst
= {
155 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
156 BCM47XX_GPIO_KEY_H(4, KEY_RESTART
),
157 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode switch */
160 static const struct gpio_keys_button
161 bcm47xx_buttons_buffalo_whr_hp_g54
[] __initconst
= {
162 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
163 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
164 BCM47XX_GPIO_KEY(5, BTN_0
), /* Router / AP mode switch */
167 static const struct gpio_keys_button
168 bcm47xx_buttons_buffalo_wzr_g300n
[] __initconst
= {
169 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
172 static const struct gpio_keys_button
173 bcm47xx_buttons_buffalo_wzr_rs_g54
[] __initconst
= {
174 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
175 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
178 static const struct gpio_keys_button
179 bcm47xx_buttons_buffalo_wzr_rs_g54hp
[] __initconst
= {
180 BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON
),
181 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
186 static const struct gpio_keys_button
187 bcm47xx_buttons_dell_tm2300
[] __initconst
= {
188 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
193 static const struct gpio_keys_button
194 bcm47xx_buttons_dlink_dir130
[] __initconst
= {
195 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
196 BCM47XX_GPIO_KEY(7, KEY_UNKNOWN
),
199 static const struct gpio_keys_button
200 bcm47xx_buttons_dlink_dir330
[] __initconst
= {
201 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
202 BCM47XX_GPIO_KEY(7, KEY_UNKNOWN
),
207 static const struct gpio_keys_button
208 bcm47xx_buttons_linksys_e1000v1
[] __initconst
= {
209 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
210 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
213 static const struct gpio_keys_button
214 bcm47xx_buttons_linksys_e1000v21
[] __initconst
= {
215 BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON
),
216 BCM47XX_GPIO_KEY(10, KEY_RESTART
),
219 static const struct gpio_keys_button
220 bcm47xx_buttons_linksys_e2000v1
[] __initconst
= {
221 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
222 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
225 static const struct gpio_keys_button
226 bcm47xx_buttons_linksys_e2500v3
[] __initconst
= {
227 BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON
),
228 BCM47XX_GPIO_KEY(10, KEY_RESTART
),
231 static const struct gpio_keys_button
232 bcm47xx_buttons_linksys_e3000v1
[] __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_e3200v1
[] __initconst
= {
239 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
240 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
243 static const struct gpio_keys_button
244 bcm47xx_buttons_linksys_e4200v1
[] __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_wrt150nv1
[] __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_wrt150nv11
[] __initconst
= {
257 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
258 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
261 static const struct gpio_keys_button
262 bcm47xx_buttons_linksys_wrt160nv1
[] __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_wrt160nv3
[] __initconst
= {
269 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
270 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
273 static const struct gpio_keys_button
274 bcm47xx_buttons_linksys_wrt300n_v1
[] __initconst
= {
275 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
276 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
279 static const struct gpio_keys_button
280 bcm47xx_buttons_linksys_wrt300nv11
[] __initconst
= {
281 BCM47XX_GPIO_KEY(4, KEY_UNKNOWN
),
282 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
285 static const struct gpio_keys_button
286 bcm47xx_buttons_linksys_wrt310nv1
[] __initconst
= {
287 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
288 BCM47XX_GPIO_KEY(8, KEY_UNKNOWN
),
291 static const struct gpio_keys_button
292 bcm47xx_buttons_linksys_wrt310n_v2
[] __initconst
= {
293 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
294 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
297 static const struct gpio_keys_button
298 bcm47xx_buttons_linksys_wrt320n_v1
[] __initconst
= {
299 BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON
),
300 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
303 static const struct gpio_keys_button
304 bcm47xx_buttons_linksys_wrt54g3gv2
[] __initconst
= {
305 BCM47XX_GPIO_KEY(5, KEY_WIMAX
),
306 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
309 static const struct gpio_keys_button
310 bcm47xx_buttons_linksys_wrt54g_generic
[] __initconst
= {
311 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
312 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
315 static const struct gpio_keys_button
316 bcm47xx_buttons_linksys_wrt610nv1
[] __initconst
= {
317 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
318 BCM47XX_GPIO_KEY(8, KEY_WPS_BUTTON
),
321 static const struct gpio_keys_button
322 bcm47xx_buttons_linksys_wrt610nv2
[] __initconst
= {
323 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
324 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
327 static const struct gpio_keys_button
328 bcm47xx_buttons_linksys_wrtsl54gs
[] __initconst
= {
329 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
330 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
335 static const struct gpio_keys_button
336 bcm47xx_buttons_luxul_abr_4400_v1
[] = {
337 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
340 static const struct gpio_keys_button
341 bcm47xx_buttons_luxul_xap_310_v1
[] = {
342 BCM47XX_GPIO_KEY(20, KEY_RESTART
),
345 static const struct gpio_keys_button
346 bcm47xx_buttons_luxul_xap_1210_v1
[] = {
347 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
350 static const struct gpio_keys_button
351 bcm47xx_buttons_luxul_xap_1230_v1
[] = {
352 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
355 static const struct gpio_keys_button
356 bcm47xx_buttons_luxul_xap_1240_v1
[] = {
357 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
360 static const struct gpio_keys_button
361 bcm47xx_buttons_luxul_xap_1500_v1
[] = {
362 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
365 static const struct gpio_keys_button
366 bcm47xx_buttons_luxul_xbr_4400_v1
[] = {
367 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
370 static const struct gpio_keys_button
371 bcm47xx_buttons_luxul_xvw_p30_v1
[] = {
372 BCM47XX_GPIO_KEY(20, KEY_RESTART
),
375 static const struct gpio_keys_button
376 bcm47xx_buttons_luxul_xwr_600_v1
[] = {
377 BCM47XX_GPIO_KEY(8, KEY_RESTART
),
380 static const struct gpio_keys_button
381 bcm47xx_buttons_luxul_xwr_1750_v1
[] = {
382 BCM47XX_GPIO_KEY(14, KEY_RESTART
),
387 static const struct gpio_keys_button
388 bcm47xx_buttons_microsoft_nm700
[] __initconst
= {
389 BCM47XX_GPIO_KEY(7, KEY_RESTART
),
394 static const struct gpio_keys_button
395 bcm47xx_buttons_motorola_we800g
[] __initconst
= {
396 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
399 static const struct gpio_keys_button
400 bcm47xx_buttons_motorola_wr850gp
[] __initconst
= {
401 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
404 static const struct gpio_keys_button
405 bcm47xx_buttons_motorola_wr850gv2v3
[] __initconst
= {
406 BCM47XX_GPIO_KEY(5, KEY_RESTART
),
411 static const struct gpio_keys_button
412 bcm47xx_buttons_netgear_r6200_v1
[] __initconst
= {
413 BCM47XX_GPIO_KEY(2, KEY_RFKILL
),
414 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
415 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
418 static const struct gpio_keys_button
419 bcm47xx_buttons_netgear_r6300_v1
[] __initconst
= {
420 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
423 static const struct gpio_keys_button
424 bcm47xx_buttons_netgear_wn2500rp_v1
[] __initconst
= {
425 BCM47XX_GPIO_KEY(12, KEY_RESTART
),
426 BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON
),
429 static const struct gpio_keys_button
430 bcm47xx_buttons_netgear_wndr3400v1
[] __initconst
= {
431 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
432 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
433 BCM47XX_GPIO_KEY(8, KEY_RFKILL
),
436 static const struct gpio_keys_button
437 bcm47xx_buttons_netgear_wndr3400_v3
[] __initconst
= {
438 BCM47XX_GPIO_KEY(12, KEY_RESTART
),
439 BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON
),
442 static const struct gpio_keys_button
443 bcm47xx_buttons_netgear_wndr3700v3
[] __initconst
= {
444 BCM47XX_GPIO_KEY(2, KEY_RFKILL
),
445 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
446 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
449 static const struct gpio_keys_button
450 bcm47xx_buttons_netgear_wndr4500v1
[] __initconst
= {
451 BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON
),
452 BCM47XX_GPIO_KEY(5, KEY_RFKILL
),
453 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
456 static const struct gpio_keys_button
457 bcm47xx_buttons_netgear_wnr1000_v3
[] __initconst
= {
458 BCM47XX_GPIO_KEY(2, KEY_WPS_BUTTON
),
459 BCM47XX_GPIO_KEY(3, KEY_RESTART
),
462 static const struct gpio_keys_button
463 bcm47xx_buttons_netgear_wnr3500lv1
[] __initconst
= {
464 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
465 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
468 static const struct gpio_keys_button
469 bcm47xx_buttons_netgear_wnr3500lv2
[] __initconst
= {
470 BCM47XX_GPIO_KEY(4, KEY_RESTART
),
471 BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON
),
472 BCM47XX_GPIO_KEY(8, KEY_RFKILL
),
475 static const struct gpio_keys_button
476 bcm47xx_buttons_netgear_wnr834bv2
[] __initconst
= {
477 BCM47XX_GPIO_KEY(6, KEY_RESTART
),
482 static const struct gpio_keys_button
483 bcm47xx_buttons_simpletech_simpleshare
[] __initconst
= {
484 BCM47XX_GPIO_KEY(0, KEY_RESTART
),
487 /**************************************************
489 **************************************************/
491 static struct gpio_keys_platform_data bcm47xx_button_pdata
;
493 static struct platform_device bcm47xx_buttons_gpio_keys
= {
496 .platform_data
= &bcm47xx_button_pdata
,
500 /* Copy data from __initconst */
501 static int __init
bcm47xx_buttons_copy(const struct gpio_keys_button
*buttons
,
504 size_t size
= nbuttons
* sizeof(*buttons
);
506 bcm47xx_button_pdata
.buttons
= kmemdup(buttons
, size
, GFP_KERNEL
);
507 if (!bcm47xx_button_pdata
.buttons
)
509 bcm47xx_button_pdata
.nbuttons
= nbuttons
;
514 #define bcm47xx_copy_bdata(dev_buttons) \
515 bcm47xx_buttons_copy(dev_buttons, ARRAY_SIZE(dev_buttons));
517 int __init
bcm47xx_buttons_register(void)
519 enum bcm47xx_board board
= bcm47xx_board_get();
523 case BCM47XX_BOARD_ASUS_RTN10U
:
524 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u
);
526 case BCM47XX_BOARD_ASUS_RTN12
:
527 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12
);
529 case BCM47XX_BOARD_ASUS_RTN16
:
530 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn16
);
532 case BCM47XX_BOARD_ASUS_RTN66U
:
533 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn66u
);
535 case BCM47XX_BOARD_ASUS_WL300G
:
536 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl300g
);
538 case BCM47XX_BOARD_ASUS_WL320GE
:
539 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl320ge
);
541 case BCM47XX_BOARD_ASUS_WL330GE
:
542 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl330ge
);
544 case BCM47XX_BOARD_ASUS_WL500G
:
545 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500g
);
547 case BCM47XX_BOARD_ASUS_WL500GD
:
548 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gd
);
550 case BCM47XX_BOARD_ASUS_WL500GPV1
:
551 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gpv1
);
553 case BCM47XX_BOARD_ASUS_WL500GPV2
:
554 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500gpv2
);
556 case BCM47XX_BOARD_ASUS_WL500W
:
557 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl500w
);
559 case BCM47XX_BOARD_ASUS_WL520GC
:
560 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl520gc
);
562 case BCM47XX_BOARD_ASUS_WL520GU
:
563 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl520gu
);
565 case BCM47XX_BOARD_ASUS_WL700GE
:
566 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wl700ge
);
568 case BCM47XX_BOARD_ASUS_WLHDD
:
569 err
= bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd
);
572 case BCM47XX_BOARD_BELKIN_F7D3301
:
573 case BCM47XX_BOARD_BELKIN_F7D3302
:
574 case BCM47XX_BOARD_BELKIN_F7D4301
:
575 case BCM47XX_BOARD_BELKIN_F7D4302
:
576 case BCM47XX_BOARD_BELKIN_F7D4401
:
577 err
= bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301
);
580 case BCM47XX_BOARD_BUFFALO_WHR2_A54G54
:
581 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr2_a54g54
);
583 case BCM47XX_BOARD_BUFFALO_WHR_G125
:
584 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_g125
);
586 case BCM47XX_BOARD_BUFFALO_WHR_G54S
:
587 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_g54s
);
589 case BCM47XX_BOARD_BUFFALO_WHR_HP_G54
:
590 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_whr_hp_g54
);
592 case BCM47XX_BOARD_BUFFALO_WZR_G300N
:
593 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_g300n
);
595 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54
:
596 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_rs_g54
);
598 case BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP
:
599 err
= bcm47xx_copy_bdata(bcm47xx_buttons_buffalo_wzr_rs_g54hp
);
602 case BCM47XX_BOARD_DELL_TM2300
:
603 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dell_tm2300
);
606 case BCM47XX_BOARD_DLINK_DIR130
:
607 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dlink_dir130
);
609 case BCM47XX_BOARD_DLINK_DIR330
:
610 err
= bcm47xx_copy_bdata(bcm47xx_buttons_dlink_dir330
);
613 case BCM47XX_BOARD_HUAWEI_E970
:
614 err
= bcm47xx_copy_bdata(bcm47xx_buttons_huawei_e970
);
617 case BCM47XX_BOARD_LINKSYS_E1000V1
:
618 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e1000v1
);
620 case BCM47XX_BOARD_LINKSYS_E1000V21
:
621 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e1000v21
);
623 case BCM47XX_BOARD_LINKSYS_E2000V1
:
624 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1
);
626 case BCM47XX_BOARD_LINKSYS_E2500V3
:
627 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3
);
629 case BCM47XX_BOARD_LINKSYS_E3000V1
:
630 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1
);
632 case BCM47XX_BOARD_LINKSYS_E3200V1
:
633 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3200v1
);
635 case BCM47XX_BOARD_LINKSYS_E4200V1
:
636 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e4200v1
);
638 case BCM47XX_BOARD_LINKSYS_WRT150NV1
:
639 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt150nv1
);
641 case BCM47XX_BOARD_LINKSYS_WRT150NV11
:
642 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt150nv11
);
644 case BCM47XX_BOARD_LINKSYS_WRT160NV1
:
645 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv1
);
647 case BCM47XX_BOARD_LINKSYS_WRT160NV3
:
648 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3
);
650 case BCM47XX_BOARD_LINKSYS_WRT300N_V1
:
651 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300n_v1
);
653 case BCM47XX_BOARD_LINKSYS_WRT300NV11
:
654 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11
);
656 case BCM47XX_BOARD_LINKSYS_WRT310NV1
:
657 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1
);
659 case BCM47XX_BOARD_LINKSYS_WRT310NV2
:
660 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2
);
662 case BCM47XX_BOARD_LINKSYS_WRT320N_V1
:
663 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1
);
665 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2
:
666 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2
);
668 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101
:
669 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467
:
670 case BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708
:
671 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g_generic
);
673 case BCM47XX_BOARD_LINKSYS_WRT610NV1
:
674 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1
);
676 case BCM47XX_BOARD_LINKSYS_WRT610NV2
:
677 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2
);
679 case BCM47XX_BOARD_LINKSYS_WRTSL54GS
:
680 err
= bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs
);
683 case BCM47XX_BOARD_LUXUL_ABR_4400_V1
:
684 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_abr_4400_v1
);
686 case BCM47XX_BOARD_LUXUL_XAP_310_V1
:
687 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_310_v1
);
689 case BCM47XX_BOARD_LUXUL_XAP_1210_V1
:
690 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1210_v1
);
692 case BCM47XX_BOARD_LUXUL_XAP_1230_V1
:
693 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1230_v1
);
695 case BCM47XX_BOARD_LUXUL_XAP_1240_V1
:
696 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1240_v1
);
698 case BCM47XX_BOARD_LUXUL_XAP_1500_V1
:
699 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1500_v1
);
701 case BCM47XX_BOARD_LUXUL_XBR_4400_V1
:
702 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xbr_4400_v1
);
704 case BCM47XX_BOARD_LUXUL_XVW_P30_V1
:
705 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xvw_p30_v1
);
707 case BCM47XX_BOARD_LUXUL_XWR_600_V1
:
708 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_600_v1
);
710 case BCM47XX_BOARD_LUXUL_XWR_1750_V1
:
711 err
= bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1
);
714 case BCM47XX_BOARD_MICROSOFT_MN700
:
715 err
= bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700
);
718 case BCM47XX_BOARD_MOTOROLA_WE800G
:
719 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g
);
721 case BCM47XX_BOARD_MOTOROLA_WR850GP
:
722 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gp
);
724 case BCM47XX_BOARD_MOTOROLA_WR850GV2V3
:
725 err
= bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3
);
728 case BCM47XX_BOARD_NETGEAR_R6200_V1
:
729 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1
);
731 case BCM47XX_BOARD_NETGEAR_R6300_V1
:
732 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1
);
734 case BCM47XX_BOARD_NETGEAR_WN2500RP_V1
:
735 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1
);
737 case BCM47XX_BOARD_NETGEAR_WNDR3400V1
:
738 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1
);
740 case BCM47XX_BOARD_NETGEAR_WNDR3400_V3
:
741 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3
);
743 case BCM47XX_BOARD_NETGEAR_WNDR3700V3
:
744 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3
);
746 case BCM47XX_BOARD_NETGEAR_WNDR4500V1
:
747 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr4500v1
);
749 case BCM47XX_BOARD_NETGEAR_WNR1000_V3
:
750 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr1000_v3
);
752 case BCM47XX_BOARD_NETGEAR_WNR3500L
:
753 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1
);
755 case BCM47XX_BOARD_NETGEAR_WNR3500L_V2
:
756 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2
);
758 case BCM47XX_BOARD_NETGEAR_WNR834BV2
:
759 err
= bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2
);
762 case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE
:
763 err
= bcm47xx_copy_bdata(bcm47xx_buttons_simpletech_simpleshare
);
767 pr_debug("No buttons configuration found for this device\n");
774 err
= platform_device_register(&bcm47xx_buttons_gpio_keys
);
776 pr_err("Failed to register platform device: %d\n", err
);