From: Konrad Dybcio <konradybcio@kernel.org>
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: Marijn Suijten <marijn.suijten@somainline.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Konrad Dybcio <quic_kdybcio@quicinc.com>,
20240830-nxp-ptn3222-v2-0-4c6d8535cf6c@linaro.org
Subject: [PATCH 1/2] arm64: dts: qcom: x1e80100-romulus: Add lid switch
Date: Mon, 02 Sep 2024 16:50:33 +0200 [thread overview]
Message-ID: <20240902-topic-sl7_updates-v1-1-3ee667e6652d@quicinc.com> (raw)
In-Reply-To: <20240902-topic-sl7_updates-v1-0-3ee667e6652d@quicinc.com>
From: Konrad Dybcio <quic_kdybcio@quicinc.com>
One of the best parts of having a laptop is being able to close the lid
and go on with your day. Enable this feature by defining the lid switch.
Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com>
---
.../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
index 42e02ad6a9c3..5419d0b02785 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
@@ -4,6 +4,8 @@
*/
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
@@ -30,6 +32,21 @@ backlight: backlight {
pinctrl-names = "default";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&hall_int_n_default>;
+ pinctrl-names = "default";
+
+ switch-lid {
+ gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ wakeup-source;
+ wakeup-event-action = <EV_ACT_DEASSERTED>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
@@ -704,6 +721,12 @@ &tlmm {
gpio-reserved-ranges = <44 4>, /* SPI (TPM) */
<238 1>; /* UFS Reset */
+ hall_int_n_default: hall-int-n-state {
+ pins = "gpio2";
+ function = "gpio";
+ bias-disable;
+ };
+
nvme_reg_en: nvme-reg-en-state {
pins = "gpio18";
function = "gpio";
--
2.46.0
next prev parent reply other threads:[~2024-09-02 14:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 14:50 [PATCH 0/2] More Surface Laptop 7 features Konrad Dybcio
2024-09-02 14:50 ` Konrad Dybcio [this message]
2024-09-02 18:43 ` [PATCH 1/2] arm64: dts: qcom: x1e80100-romulus: Add lid switch Dmitry Baryshkov
2024-09-02 14:50 ` [PATCH 2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller Konrad Dybcio
2024-09-02 16:01 ` neil.armstrong
2024-09-02 16:07 ` Konrad Dybcio
2024-09-02 16:09 ` neil.armstrong
2024-09-02 18:43 ` Dmitry Baryshkov
2024-10-07 14:25 ` [PATCH 0/2] More Surface Laptop 7 features Bjorn Andersson
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=20240902-topic-sl7_updates-v1-1-3ee667e6652d@quicinc.com \
--to=konradybcio@kernel.org \
--cc=20240830-nxp-ptn3222-v2-0-4c6d8535cf6c@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_kdybcio@quicinc.com \
--cc=robh@kernel.org \
/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®