Skip to contentSkip to conversation

arm64: dts: rockchip: Fix cover detection on PineNote

PATCH Applied Diederik de Haas 2 participants 2 messages May 26, 2025 – Jun 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Fix cover detection on PineNote

The SW_MACHINE_COVER switch event was added to input event codes to detect the removal of the back cover of the N900.
But on the PineNote its purpose is to detect when the front cover gets closed, just like when a laptop lid is closed. Therefore SW_LID is the appropriate linux code and not SW_MACHINE_COVER.

---
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index 3613661417b2..5c6f8cc401c9 100644
@@ -55,7 +55,7 @@ switch-cover {
 			label = "cover";
 			gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>;
 			linux,input-type = <EV_SW>;
-			linux,code = <SW_MACHINE_COVER>;
+			linux,code = <SW_LID>;
 			linux,can-disable;
 			wakeup-event-action = <EV_ACT_DEASSERTED>;
 			wakeup-source;
Signature · 1 line
2.49.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Diederik de Haas

The SW_MACHINE_COVER switch event was added to input event codes to detect the removal of the back cover of the N900.
But on the PineNote its purpose is to detect when the front cover gets closed, just like when a laptop lid is closed. Therefore SW_LID is the appropriate linux code and not SW_MACHINE_COVER.

[...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Fix cover detection on PineNote

      commit: 3f391123e2bc88c570f148cc01e923e4740c5173

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>