openwrt/target/linux/bcm47xx/patches-5.10/325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch
Nick Hainke 00952fb0ca
bcm47xx: replace "Devices-database-update-patch" with upstream patches
Replace "320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch" with
upstream patches:
- 320-v5.17-MIPS-BCM47XX-Add-board-entry-for-Linksys-WRT320N-v1.patch
- 321-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-R6300-v1.patch
- 322-v5.17-MIPS-BCM47XX-Add-support-for-Netgear-WN2500RP-v1-v2.patch
- 323-v6.0-MIPS-BCM47XX-Add-support-for-Netgear-WNR3500L-v2.patch
- 324-v5.17-MIPS-BCM47XX-Add-LEDs-and-buttons-for-Asus-RTN-10U.patch
- 325-v5.17-MIPS-BCM47XX-Define-Linksys-WRT310N-V2-buttons.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-30 20:03:59 +01:00

41 lines
1.4 KiB
Diff

From eea175eedf3e2f71b9538d21e643e7a1be4923df Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 6 Jan 2022 19:51:37 -0800
Subject: [PATCH] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
Update the buttons registration code to register the two buttons (WPS,
system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board
entry.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
arch/mips/bcm47xx/buttons.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -289,6 +289,12 @@ bcm47xx_buttons_linksys_wrt320n_v1[] __i
};
static const struct gpio_keys_button
+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
+};
+
+static const struct gpio_keys_button
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
BCM47XX_GPIO_KEY(6, KEY_RESTART),
@@ -644,6 +650,9 @@ int __init bcm47xx_buttons_register(void
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
break;
+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
+ break;
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
break;