From: Stephan Gerhold Date: Wed, 10 Jul 2024 08:18:20 +0000 (+0200) Subject: arm64: dts: qcom: x1e80100-crd: Add LID switch X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8d86550c2fc262c49a10a4a0e9837d8949f3578b;p=linux.git arm64: dts: qcom: x1e80100-crd: Add LID switch Add gpio-keys for exposing the LID switch state, similar to sc8280xp-lenovo-thinkpad-x13s.dts. Only the GPIO number is different. Signed-off-by: Stephan Gerhold Tested-by: Abel Vesa Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20240710-x1e80100-crd-lid-v1-1-0156e8a62af6@linaro.org Signed-off-by: Bjorn Andersson --- diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts index 7b90c9e40e37..06829cf799a7 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include +#include #include #include "x1e80100.dtsi" @@ -49,6 +51,21 @@ stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&hall_int_n_default>; + pinctrl-names = "default"; + + switch-lid { + gpios = <&tlmm 92 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + wakeup-source; + wakeup-event-action = ; + }; + }; + pmic-glink { compatible = "qcom,x1e80100-pmic-glink", "qcom,sm8550-pmic-glink", @@ -922,6 +939,12 @@ bias-disable; }; + hall_int_n_default: hall-int-n-state { + pins = "gpio92"; + function = "gpio"; + bias-disable; + }; + kybd_default: kybd-default-state { pins = "gpio67"; function = "gpio";