From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-mips@vger.kernel.org
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/5] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
Date: Thu, 6 Jan 2022 19:51:37 -0800 [thread overview]
Message-ID: <20220107035141.2325384-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20220107035141.2325384-1-f.fainelli@gmail.com>
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>
---
arch/mips/bcm47xx/buttons.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
index 535d84addcdb..9e7ecc585d59 100644
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -276,6 +276,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = {
BCM47XX_GPIO_KEY(8, KEY_UNKNOWN),
};
+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),
@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void)
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
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;
--
2.25.1
next prev parent reply other threads:[~2022-01-07 3:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 3:51 [PATCH 0/5] MIPS: BCM47XX: Board updates from OpenWrt Florian Fainelli
2022-01-07 3:51 ` Florian Fainelli [this message]
2022-01-07 3:51 ` [PATCH 2/5] MIPS: BCM47XX: Add board entry for Linksys WRT320N v1 Florian Fainelli
2022-01-07 3:51 ` [PATCH 3/5] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U Florian Fainelli
2022-01-07 3:51 ` [PATCH 4/5] MIPS: BCM47XX: Add support for Netgear R6300 v1 Florian Fainelli
2022-01-07 3:51 ` [PATCH 5/5] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2 Florian Fainelli
2022-01-09 21:43 ` [PATCH 0/5] MIPS: BCM47XX: Board updates from OpenWrt Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220107035141.2325384-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).