[PATCH] pinctrl: qcom: sc8180x: Add missing dual edge GPIO IRQ errata flag

From: Haipeng Lin via B4 Relay

Date: Sat Nov 14 2026 - 01:19:13 EST


From: Haipeng Lin <jimmie.lin@xxxxxxxxx>

Wakeup-capable GPIOs on SC8180X use the PDC as their parent interrupt
chip. Like the SM8150, the PDC on SC8180X does not support dual-edge
interrupts, so dual-edge GPIO interrupts only fire on a single edge
unless emulated by the TLMM driver via wakeirq_dual_edge_errata.

On SC8180X boards with a gpio-keys lid switch (e.g., Lenovo Flex 5G,
Surface Pro X) this causes the falling edge (lid close) to stop trig-
gering interrupts after the first suspend/resume cycle, preventing the
system from suspending again when the lid is closed.

Enables wakeirq_dual_edge_errata for SC8180X. Feature tested on a
v7.3.3 tree for the Surface Pro X with this patch applied, the lid
switch on TLMM GPIO 121 (PDC pin 89) now works after the first resume.
Without this patch opening the lid raised an interrupt but not on
close.

Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver")
Cc: stable@xxxxxxxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Haipeng Lin <jimmie.lin@xxxxxxxxx>
---
Hi,

This fixes a lid-switch issue in SC8180X identified when trying to get
the Surface Pro X to sleep/resume when closing/opening the type cover.
It should apply cleanly to both fixes or devel but I based it off
pinctrl/devel to send out the patch.

Thanks,
---
drivers/pinctrl/qcom/pinctrl-sc8180x.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
index 062cb913e5ee..fef21b2db57c 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
@@ -1597,6 +1597,7 @@ static struct msm_pinctrl_soc_data sc8180x_pinctrl = {
.ngpios = 191,
.wakeirq_map = sc8180x_pdc_map,
.nwakeirq_map = ARRAY_SIZE(sc8180x_pdc_map),
+ .wakeirq_dual_edge_errata = true,
};

static const struct msm_pinctrl_soc_data sc8180x_acpi_pinctrl = {

---
base-commit: 135fd91896455cd1b611a8ef99c35df8ba9c17df
change-id: 20261114-up-sc8180x-pinctrl-dual-edge-f63c9740afb7

Best regards,
--
Haipeng Lin <jimmie.lin@xxxxxxxxx>