mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erikas Bitovtas <xerikasxx@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	 Erikas Bitovtas <xerikasxx@gmail.com>
Subject: [PATCH 2/2] arm64: dts: qcom: msm8939-asus-z00t: add hall sensor
Date: Sat, 15 Nov 2025 14:26:44 +0200	[thread overview]
Message-ID: <20251115-battery-hall-v1-2-1586283d17c7@gmail.com> (raw)
In-Reply-To: <20251115-battery-hall-v1-0-1586283d17c7@gmail.com>

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


  parent reply	other threads:[~2025-11-15 12:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 12:26 [PATCH 0/2] Asus ZenFone 2 Laser/Selfie includes a battery measured by voltage mode BMS and a simple GPIO hall effect sensor. The following commits include support for these components Erikas Bitovtas
2025-11-15 12:26 ` [PATCH 1/2] arm64: dts: qcom: msm8939-asus-z00t: add battery Erikas Bitovtas
2025-11-17 12:30   ` Konrad Dybcio
2025-11-15 12:26 ` Erikas Bitovtas [this message]
2025-11-17 12:30   ` [PATCH 2/2] arm64: dts: qcom: msm8939-asus-z00t: add hall sensor Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251115-battery-hall-v1-2-1586283d17c7@gmail.com \
    --to=xerikasxx@gmail.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®