]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: qcom: sm6115-pro1x: Add Hall Switch and Camera Button
authorDang Huynh <danct12@riseup.net>
Wed, 31 Jul 2024 06:18:42 +0000 (13:18 +0700)
committerBjorn Andersson <andersson@kernel.org>
Thu, 1 Aug 2024 02:40:37 +0000 (21:40 -0500)
The Pro1X has a flip keyboard and a single-state camera button.

Signed-off-by: Dang Huynh <danct12@riseup.net>
Link: https://lore.kernel.org/r/20240731-qx1050-feature-expansion-v3-1-b945527fa5d2@riseup.net
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts

index 4a30024aa48fb47822c24f91e2dabb49d5bf3308..70f479a63f2e55f0d9fe3ec46da164e0bf2b1023 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
 /*
- * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
+ * Copyright (c) 2023 - 2024, Dang Huynh <danct12@riseup.net>
  */
 
 /dts-v1/;
        gpio-keys {
                compatible = "gpio-keys";
 
-               pinctrl-0 = <&vol_up_n>;
+               pinctrl-0 = <&hall_sensor_n>, <&key_camera_n>, <&vol_up_n>;
                pinctrl-names = "default";
 
+               hall-switch {
+                       label = "Hall Switch";
+                       linux,input-type = <EV_SW>;
+                       linux,code = <SW_KEYPAD_SLIDE>;
+                       gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+                       debounce-interval = <90>;
+                       wakeup-source;
+               };
+
+               key-camera {
+                       label = "Camera Button";
+                       linux,code = <KEY_CAMERA>;
+                       gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <15>;
+               };
+
                key-volume-up {
                        label = "Volume Up";
                        linux,code = <KEY_VOLUMEUP>;
 
 &tlmm {
        gpio-reserved-ranges = <0 4>, <14 4>;
+
+       key_camera_n: key-camera-n-state {
+               pins = "gpio18";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-pull-up;
+       };
+
+       hall_sensor_n: hall-sensor-n-state {
+               pins = "gpio96";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-pull-up;
+       };
 };
 
 &ufs_mem_hc {