[OpenWrt-Devel,7/7] ath79: WNR2000v3: change WPS button to interrupt-driven GPIO key
diff mbox series

Message ID 20190806130234.4a3268fb@kosmio.komorska
State New
Headers show
Series
  • ath79: add support for some Netgear WNR routers
Related show

Commit Message

Michal Cieslakiewicz Aug. 6, 2019, 11:02 a.m. UTC
WNR2000v3 has one button (WPS) connected to AR7241 GPIO directly.
This patch changes its servicing method from polling to IRQ.
All other buttons, connected to wireless chip GPIO pins, remain polled.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
---
 target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Adrian Schmutzler Aug. 6, 2019, 1:04 p.m. UTC | #1
> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Michal Cieslakiewicz
> Sent: Dienstag, 6. August 2019 13:03
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 7/7] ath79: WNR2000v3: change WPS button
> to interrupt-driven GPIO key
> 
> WNR2000v3 has one button (WPS) connected to AR7241 GPIO directly.
> This patch changes its servicing method from polling to IRQ.
> All other buttons, connected to wireless chip GPIO pins, remain polled.
> 
> Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

If interrupt-driven gpio-keys is working for your device, you can already include it in the support-PR as well.

Best

Adrian

Patch
diff mbox series

diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
index 57260ffd1e..6ab32d3188 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
@@ -22,8 +22,7 @@ 
 	};
 
 	keys {
-		compatible = "gpio-keys-polled";
-		poll-interval = <20>;
+		compatible = "gpio-keys";
 
 		wps {
 			label = "wps";
@@ -31,6 +30,11 @@ 
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 			debounce-interval = <60>;
 		};
+	};
+
+	ath9k-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
 
 		reset {
 			label = "reset";