[PATCH 2/2] arm64: dts: qcom: msm8939-asus-z00t: add hall sensor

Erikas Bitovtas posted 2 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH 2/2] arm64: dts: qcom: msm8939-asus-z00t: add hall sensor
Posted by Erikas Bitovtas 2 months, 3 weeks ago
This device uses ANPEC APX9131 hall sensor. It is a basic GPIO hall
sensor for which a generic "gpio-keys" device tree node configuration
suffices.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts b/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
index b58f0a04abfd..60a714a62a2c 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
@@ -62,6 +62,15 @@ button-volume-down {
 			linux,code = <KEY_VOLUMEDOWN>;
 			debounce-interval = <15>;
 		};
+
+		event-hall-sensor {
+			label = "Hall Effect Sensor";
+			gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;
+			debounce-interval = <150>;
+		};
 	};
 
 	reg_sd_vmmc: regulator-sdcard-vmmc {
@@ -259,7 +268,7 @@ sd_vmmc_en_default: sd-vmmc-en-default-state {
 	};
 
 	gpio_keys_default: gpio-keys-default-state {
-		pins = "gpio107", "gpio117";
+		pins = "gpio107", "gpio108", "gpio117";
 		function = "gpio";
 		drive-strength = <2>;
 		bias-pull-up;

-- 
2.51.2
Re: [PATCH 2/2] arm64: dts: qcom: msm8939-asus-z00t: add hall sensor
Posted by Konrad Dybcio 2 months, 3 weeks ago
On 11/15/25 1:26 PM, Erikas Bitovtas wrote:
> This device uses ANPEC APX9131 hall sensor. It is a basic GPIO hall
> sensor for which a generic "gpio-keys" device tree node configuration
> suffices.
> 
> Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts b/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
> index b58f0a04abfd..60a714a62a2c 100644
> --- a/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts
> @@ -62,6 +62,15 @@ button-volume-down {
>  			linux,code = <KEY_VOLUMEDOWN>;
>  			debounce-interval = <15>;
>  		};
> +
> +		event-hall-sensor {
> +			label = "Hall Effect Sensor";
> +			gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <EV_SW>;
> +			linux,code = <SW_LID>;
> +			linux,can-disable;
> +			debounce-interval = <150>;
> +		};
>  	};
>  
>  	reg_sd_vmmc: regulator-sdcard-vmmc {
> @@ -259,7 +268,7 @@ sd_vmmc_en_default: sd-vmmc-en-default-state {
>  	};
>  
>  	gpio_keys_default: gpio-keys-default-state {
> -		pins = "gpio107", "gpio117";
> +		pins = "gpio107", "gpio108", "gpio117";

I think it'd make sense to keep it a separate entry

Konrad