Skip to content

Commit

Permalink
arm64: dts: qcom: x1e80100-crd: Add LID switch
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Abel Vesa <[email protected]>
Reviewed-by: Abel Vesa <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Reviewed-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
stephan-gh authored and andersson committed Jul 29, 2024
1 parent a237b8d commit 8d86550
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions arch/arm64/boot/dts/qcom/x1e80100-crd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = <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",
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 8d86550

Please sign in to comment.