Thread (3 messages) flat view 3 messages, 1 author, 27d ago
COLD27d

[PATCH 1/2] arm64: tegra: Use consistent key code for force-recovery button

From: Thierry Reding <thierry.reding@kernel.org>
Date: 2026-08-27 14:54:39
Also in: linux-tegra, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

From: Thierry Reding <redacted>

Some boards use the KEY_SLEEP input key code for the force-recovery
button, whereas others use BTN_1. The latter isn't valid because it only
applies to devices marked CAP_POINTER. Use KEY_SLEEP consistently for
all devices.

On certain Tegra234 devices there are definitions for a suspend key that
uses KEY_SLEEP, but I couldn't find any references to this key in any of
the board documents, so remove them.

Signed-off-by: Thierry Reding <redacted>
---
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts            | 2 +-
 arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi     | 9 +--------
 arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts | 9 +--------
 arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi     | 2 +-
 4 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
index d78b9bd45df6..6c5f1b4765fc 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
@@ -1750,7 +1750,7 @@ key-force-recovery {
 			label = "Force Recovery";
 			gpios = <&gpio TEGRA_GPIO(X, 6) GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_KEY>;
-			linux,code = <BTN_1>;
+			linux,code = <KEY_SLEEP>;
 			debounce-interval = <30>;
 		};
 
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
index 420858a8f4a8..9b990d1cef3f 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi
@@ -391,7 +391,7 @@ key-force-recovery {
 			label = "Force Recovery";
 			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_KEY>;
-			linux,code = <BTN_1>;
+			linux,code = <KEY_SLEEP>;
 		};
 
 		key-power {
@@ -402,13 +402,6 @@ key-power {
 			wakeup-event-action = <EV_ACT_ASSERTED>;
 			wakeup-source;
 		};
-
-		key-suspend {
-			label = "Suspend";
-			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>;
-			linux,input-type = <EV_KEY>;
-			linux,code = <KEY_SLEEP>;
-		};
 	};
 
 	fan: pwm-fan {
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
index 97cede1fcb70..f5fb2d327650 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
@@ -337,7 +337,7 @@ key-force-recovery {
 			label = "Force Recovery";
 			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_KEY>;
-			linux,code = <BTN_1>;
+			linux,code = <KEY_SLEEP>;
 		};
 
 		key-power {
@@ -348,13 +348,6 @@ key-power {
 			wakeup-event-action = <EV_ACT_ASSERTED>;
 			wakeup-source;
 		};
-
-		key-suspend {
-			label = "Suspend";
-			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>;
-			linux,input-type = <EV_KEY>;
-			linux,code = <KEY_SLEEP>;
-		};
 	};
 
 	serial {
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi
index 41821354bbda..9b93074e5aed 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767.dtsi
@@ -216,7 +216,7 @@ key-force-recovery {
 			label = "Force Recovery";
 			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_KEY>;
-			linux,code = <BTN_1>;
+			linux,code = <KEY_SLEEP>;
 		};
 
 		key-power {
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help