diff mbox series

arm64: dts: qcom: x1e80100-crd: Add LID switch

Message ID 20240710-x1e80100-crd-lid-v1-1-0156e8a62af6@linaro.org (mailing list archive)
State Accepted
Commit 8d86550c2fc262c49a10a4a0e9837d8949f3578b
Headers show
Series arm64: dts: qcom: x1e80100-crd: Add LID switch | expand

Commit Message

Stephan Gerhold July 10, 2024, 8:18 a.m. UTC
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 <stephan.gerhold@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)


---
base-commit: 6fd4da15c334831a865d4700ceb3ff5a917163e3
change-id: 20240710-x1e80100-crd-lid-4393fdebaf92

Best regards,

Comments

Abel Vesa July 10, 2024, 8:24 a.m. UTC | #1
On 24-07-10 10:18:20, Stephan Gerhold wrote:
> 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 <stephan.gerhold@linaro.org>

Tested-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>

> ---
>  arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
> index 6152bcd0bc1f..889253ff5408 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 <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/gpio-keys.h>
> +#include <dt-bindings/input/input.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  
>  #include "x1e80100.dtsi"
> @@ -49,6 +51,21 @@ chosen {
>  		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 = <EV_SW>;
> +			linux,code = <SW_LID>;
> +			wakeup-source;
> +			wakeup-event-action = <EV_ACT_DEASSERTED>;
> +		};
> +	};
> +
>  	pmic-glink {
>  		compatible = "qcom,x1e80100-pmic-glink",
>  			     "qcom,sm8550-pmic-glink",
> @@ -918,6 +935,12 @@ edp_reg_en: edp-reg-en-state {
>  		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";
> 
> ---
> base-commit: 6fd4da15c334831a865d4700ceb3ff5a917163e3
> change-id: 20240710-x1e80100-crd-lid-4393fdebaf92
> 
> Best regards,
> -- 
> Stephan Gerhold <stephan.gerhold@linaro.org>
>
Konrad Dybcio July 10, 2024, 10:36 a.m. UTC | #2
On 10.07.2024 10:18 AM, Stephan Gerhold wrote:
> 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 <stephan.gerhold@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Johan Hovold July 12, 2024, 11:05 a.m. UTC | #3
On Wed, Jul 10, 2024 at 10:18:20AM +0200, Stephan Gerhold wrote:
> 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 <stephan.gerhold@linaro.org>

Looks good, even if I can't test it currently with the debug board
connected directly to the CRD:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Johan
Konrad Dybcio July 12, 2024, 11:12 a.m. UTC | #4
On 12.07.2024 1:05 PM, Johan Hovold wrote:
> On Wed, Jul 10, 2024 at 10:18:20AM +0200, Stephan Gerhold wrote:
>> 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 <stephan.gerhold@linaro.org>
> 
> Looks good, even if I can't test it currently with the debug board
> connected directly to the CRD:

You can use a large fridge magnet

Konrad
Bjorn Andersson July 29, 2024, 3:58 a.m. UTC | #5
On Wed, 10 Jul 2024 10:18:20 +0200, Stephan Gerhold wrote:
> Add gpio-keys for exposing the LID switch state, similar to
> sc8280xp-lenovo-thinkpad-x13s.dts. Only the GPIO number is different.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: x1e80100-crd: Add LID switch
      commit: 8d86550c2fc262c49a10a4a0e9837d8949f3578b

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index 6152bcd0bc1f..889253ff5408 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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
 #include "x1e80100.dtsi"
@@ -49,6 +51,21 @@  chosen {
 		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 = <EV_SW>;
+			linux,code = <SW_LID>;
+			wakeup-source;
+			wakeup-event-action = <EV_ACT_DEASSERTED>;
+		};
+	};
+
 	pmic-glink {
 		compatible = "qcom,x1e80100-pmic-glink",
 			     "qcom,sm8550-pmic-glink",
@@ -918,6 +935,12 @@  edp_reg_en: edp-reg-en-state {
 		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";