]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add lid switch
authorAnthony Ruhier <aruhier@mailbox.org>
Thu, 19 Dec 2024 16:05:08 +0000 (17:05 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Dec 2024 04:03:40 +0000 (22:03 -0600)
commit7069abcd5340f4c8dc4a96b814609b25d7e332ee
tree4f5d8426664f8e92a4145247519175ea67537879
parentbe2f81eaa2c8e81d3de5b73dca5e133f63384cb3
arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add lid switch

Add the lid switch for the Lenovo Yoga Slim 7x.

Other x1e80100 laptops use the GPIO pin 92 only, however on the Yoga
Slim 7x this pin seems to be bridged with the pin 71. By default, the
pin 71 is set as output-high, which blocks any event on pin 92.

This patch sets the pin 71 as output-disable and sets the LID switch on
pin 92. This is aligned with how they're configured on Windows:
    GPIO  71 | 0xf147000 | in | func0 | hi | pull up   | 16 mA
    GPIO  92 | 0xf15c000 | in | func0 | lo | no pull   |  2 mA

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Anthony Ruhier <aruhier@mailbox.org>
Link: https://lore.kernel.org/r/20241219-patch-lenovo-yoga-v3-1-9c4a79068141@mailbox.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts