921825be5caa2ba565b3eb64e5d59b7c376fb47b
[openwrt/staging/ansuel.git] /
1 From eea175eedf3e2f71b9538d21e643e7a1be4923df Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Thu, 6 Jan 2022 19:51:37 -0800
4 Subject: [PATCH] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
5
6 Update the buttons registration code to register the two buttons (WPS,
7 system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board
8 entry.
9
10 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
11 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
12 ---
13 arch/mips/bcm47xx/buttons.c | 9 +++++++++
14 1 file changed, 9 insertions(+)
15
16 --- a/arch/mips/bcm47xx/buttons.c
17 +++ b/arch/mips/bcm47xx/buttons.c
18 @@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
19 };
20
21 static const struct gpio_keys_button
22 +bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
23 + BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
24 + BCM47XX_GPIO_KEY(6, KEY_RESTART),
25 +};
26 +
27 +static const struct gpio_keys_button
28 bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
29 BCM47XX_GPIO_KEY(5, KEY_WIMAX),
30 BCM47XX_GPIO_KEY(6, KEY_RESTART),
31 @@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void
32 case BCM47XX_BOARD_LINKSYS_WRT310NV1:
33 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
34 break;
35 + case BCM47XX_BOARD_LINKSYS_WRT310NV2:
36 + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
37 + break;
38 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
39 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
40 break;