All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: renesas: r8a779a0: falcon-cpu: Add SW46 switch support
@ 2021-09-22 20:30 Kieran Bingham
  2021-09-23  7:32 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Kieran Bingham @ 2021-09-22 20:30 UTC (permalink / raw)
  To: linux-renesas-soc, Geert Uytterhoeven
  Cc: Kieran Bingham, Geert Uytterhoeven, Magnus Damm, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Add support for SW46-1 and SW46-2 as switches using the gpio-keys
framework.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---

SW_LID and SW_DOCK are selected as low-impact switch events for the
default configuration. Would SW_RFKILL_ALL, and SW_MUTE_DEVICE be
preferred as more 'functional' defaults? (I have otherwise avoided these
to hopefully prevent unwanted / undocumented effects occuring on
development hardware running a full interface which may parse these)

I'd expect them to be overridden by any platform using them anyway.

Testing of these switches (and the buttons) shown at:
  https://paste.debian.net/1212884/
---
 .../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 21 ++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
index d595fbad4589..5d188a7d6e73 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
@@ -52,6 +52,24 @@ keys {
 		pinctrl-0 = <&keys_pins>;
 		pinctrl-names = "default";
 
+		sw-1 {
+			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
+			linux,code = <SW_LID>;
+			linux,input-type = <EV_SW>;
+			label = "SW46-1";
+			wakeup-source;
+			debounce-interval = <20>;
+		};
+
+		sw-2 {
+			gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+			linux,code = <SW_DOCK>;
+			linux,input-type = <EV_SW>;
+			label = "SW46-2";
+			wakeup-source;
+			debounce-interval = <20>;
+		};
+
 		key-1 {
 			gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_1>;
@@ -193,7 +211,8 @@ i2c6_pins: i2c6 {
 	};
 
 	keys_pins: keys {
-		pins = "GP_6_18", "GP_6_19", "GP_6_20";
+		pins = "GP_1_28", "GP_1_29",
+		       "GP_6_18", "GP_6_19", "GP_6_20";
 		bias-pull-up;
 	};
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-25 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 20:30 [PATCH] arm64: dts: renesas: r8a779a0: falcon-cpu: Add SW46 switch support Kieran Bingham
2021-09-23  7:32 ` Geert Uytterhoeven
2021-09-23 12:17   ` Kieran Bingham
2021-09-23 12:47     ` Geert Uytterhoeven
2021-10-25 12:50     ` Kieran Bingham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.