Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down
@ 2024-11-23 22:17 Petr Vorel
  2024-11-30 16:49 ` Alexander Reimelt
  2024-12-26 18:26 ` (subset) " Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Vorel @ 2024-11-23 22:17 UTC (permalink / raw)
  To: linux-arm-msm; +Cc: Petr Vorel, Alexander Reimelt, Konrad Dybcio

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
Tested:
# evtest /dev/input/event0 # KEY_POWER
/ # Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "pm8941_pwrkey"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
Event: time 31.770919, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 31.770919, -------------- SYN_REPORT ------------
Event: time 32.077229, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 32.077229, -------------- SYN_REPORT ------------

# evtest /dev/input/event1 # KEY_VOLUMEDOWN
Input driver version is 1.0.1
/ # Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "pm8941_resin"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
Properties:
Testing ... (interrupt to exit)
Event: time 44.979203, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 44.979203, -------------- SYN_REPORT ------------
Event: time 45.222189, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 45.222189, -------------- SYN_REPORT ------------

# evtest /dev/input/event2 # KEY_VOLUMEUP
Input driver version is 1.0.1
/ # Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 115 (KEY_VOLUMEUP)
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    250
    Repeat code 1 (REP_PERIOD)
      Value     33
Properties:
Testing ... (interrupt to exit)
Event: time 54.630877, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 54.630877, -------------- SYN_REPORT ------------
Event: time 54.912013, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 2
Event: time 54.912013, -------------- SYN_REPORT ------------
Event: time 54.931493, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 54.931493, -------------- SYN_REPORT ------------

# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:	pm8941_pwrkey
/ # /dev/input/event1:	pm8941_resin
/dev/input/event2:	gpio-keys
Select the device event number [0-2]: USAGE:
...

 .../qcom/msm8994-huawei-angler-rev-101.dts    | 21 ++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
index 29e79ae0849d8..1aca11daf83c0 100644
--- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
+++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
@@ -2,12 +2,13 @@
 /*
  * Copyright (c) 2015, Huawei Inc. All rights reserved.
  * Copyright (c) 2016, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023, Petr Vorel <petr.vorel@gmail.com>
+ * Copyright (c) 2021-2024, Petr Vorel <petr.vorel@gmail.com>
  */
 
 /dts-v1/;
 
 #include "msm8994.dtsi"
+#include "pm8994.dtsi"
 
 / {
 	model = "Huawei Nexus 6P";
@@ -46,6 +47,24 @@ reserved@6300000 {
 			no-map;
 		};
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		autorepeat;
+
+		button-vol-up {
+			label = "volume up";
+			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+	};
+};
+
+&pm8994_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+	status = "okay";
 };
 
 &blsp1_uart2 {
-- 
2.47.0


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

* Re: [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down
  2024-11-23 22:17 [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down Petr Vorel
@ 2024-11-30 16:49 ` Alexander Reimelt
  2024-12-26 18:26 ` (subset) " Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Reimelt @ 2024-11-30 16:49 UTC (permalink / raw)
  To: linux-arm-msm, Petr Vorel; +Cc: Petr Vorel, Konrad Dybcio

Hello Peter,

The changes are very similar to the H815.
Looks good to me.

Best regards
Alex



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

* Re: (subset) [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down
  2024-11-23 22:17 [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down Petr Vorel
  2024-11-30 16:49 ` Alexander Reimelt
@ 2024-12-26 18:26 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-12-26 18:26 UTC (permalink / raw)
  To: linux-arm-msm, Petr Vorel; +Cc: Alexander Reimelt, Konrad Dybcio


On Sat, 23 Nov 2024 23:17:08 +0100, Petr Vorel wrote:
> 


Applied, thanks!

[1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down
      commit: 507aae9a3549cd173d8ca5e896706e4ca92c15ad

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2024-12-26 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-23 22:17 [PATCH 1/1] arm64: dts: qcom: msm8994-angler: Enable power key, volume up/down Petr Vorel
2024-11-30 16:49 ` Alexander Reimelt
2024-12-26 18:26 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox