[PATCH 0/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config

From: Mohammad Rafi Shaik

Date: Thu Oct 15 2026 - 10:39:33 EST


The TLMM keeps a per-pin wakeup_enable bit that gates whether a toggle of
the pad is transferred to the wake up controller (PDC/MPM). Despite the
name, that transfer is what delivers the interrupt event as well as what
wakes the system from a low power mode, as the comment in
msm_gpio_irq_reqres() already notes.

Today the bit can only be armed by requesting the pin as a GPIO interrupt:
msm_gpio_irq_reqres() sets it and msm_gpio_irq_relres() clears it. That
path calls msm_pinmux_request_gpio() and so takes over the pin mux, which
makes it unusable for a pin that has to keep a peripheral function and is
still toggled by an external device to request a wake up.

Such a pin exists on boards with a SoundWire codec. While the bus is clock
stopped, the codec asks to be read out by toggling the SoundWire data line,
which stays muxed to the SoundWire function and is never requested as a
GPIO. With the pad not armed the toggle is dropped, the controller is not
resumed, and the codec's interrupt - a headset insertion, for example - is
only seen if something else happens to wake the bus first.

This series adds a "wakeup-enable" pin configuration parameter so the bit
can be armed from the pin's own configuration, without turning the pin into
a GPIO.

A pin the SoC data does not describe as wakeup capable - no
intr_wakeup_present_bit, or the present bit not set in the live register -
is rejected with -EOPNOTSUPP and an error message, rather than silently
accepting a configuration that cannot take effect. The GPIO interrupt path
keeps its existing best effort behaviour and ignores that return value, so
its behaviour is unchanged.

There is no functional change for any existing device tree: the new
parameter only does something where a board asks for it.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@xxxxxxxxxxxxxxxx>

---
Mohammad Rafi Shaik (2):
dt-bindings: pinctrl: qcom,tlmm-common: Add wakeup-enable
pinctrl: qcom: Allow arming the wakeup_enable bit from pin config

.../bindings/pinctrl/qcom,tlmm-common.yaml | 12 +++
drivers/pinctrl/qcom/pinctrl-msm.c | 101 +++++++++++++++------
2 files changed, 85 insertions(+), 28 deletions(-)
---
base-commit: d419d682257d813f6cb7a28e42b35d0edf4ad038
change-id: 20261015-tlmm_wakeup_gpio_support-9cf2c08af51f

Best regards,
--
Mohammad Rafi Shaik <mohammad.rafi.shaik@xxxxxxxxxxxxxxxx>