From: Konrad Dybcio <konrad.dybcio@somainline.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
Andy Gross <agross@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: Add LID switch
Date: Sat, 30 Jul 2022 22:53:37 +0200 [thread overview]
Message-ID: <c074cd3f-3398-f0ff-bbca-5e7ff157cc7e@somainline.org> (raw)
In-Reply-To: <20220730193617.1688563-1-bjorn.andersson@linaro.org>
On 30.07.2022 21:36, Bjorn Andersson wrote:
> Add gpio-keys for exposing the LID switch state.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Konrad
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 25 +++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 84dc92dda0b8..f3246cc13d15 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -7,6 +7,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 "sc8280xp.dtsi"
> @@ -26,6 +28,21 @@ backlight {
> pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&hall_int_state>;
> +
> + switch-lid {
> + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
> + linux,input-type = <EV_SW>;
> + linux,code = <SW_LID>;
> + wakeup-source;
> + wakeup-event-action = <EV_ACT_DEASSERTED>;
> + };
> + };
> +
> vreg_edp_bl: regulator-edp-bl {
> compatible = "regulator-fixed";
>
> @@ -347,6 +364,14 @@ reset {
> };
> };
>
> + hall_int_state: hall-int-state {
> + pins = "gpio107";
> + function = "gpio";
> +
> + input-enable;
> + bias-disable;
> + };
> +
> qup0_i2c4_default: qup0-i2c4-default-state {
> pins = "gpio171", "gpio172";
> function = "qup4";
next prev parent reply other threads:[~2022-07-30 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-30 19:36 [PATCH] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: Add LID switch Bjorn Andersson
2022-07-30 20:51 ` Steev Klimaszewski
2022-07-30 20:53 ` Konrad Dybcio [this message]
2022-08-05 8:40 ` Johan Hovold
2022-11-12 3:51 ` 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=c074cd3f-3398-f0ff-bbca-5e7ff157cc7e@somainline.org \
--to=konrad.dybcio@somainline.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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