All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config
@ 2026-10-15 14:22 Mohammad Rafi Shaik
  2026-10-15 14:22 ` [PATCH v1 1/2] dt-bindings: pinctrl: qcom,tlmm-common: Add wakeup-enable Mohammad Rafi Shaik
  2026-10-15 14:23 ` [PATCH v1 2/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config Mohammad Rafi Shaik
  0 siblings, 2 replies; 5+ messages in thread
From: Mohammad Rafi Shaik @ 2026-10-15 14:22 UTC (permalink / raw)
  To: Bartosz Golaszewski, Bjorn Andersson, Linus Walleij, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-gpio, devicetree, linux-kernel,
	Mohammad Rafi Shaik

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@oss.qualcomm.com>

---
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@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-15 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 14:22 [PATCH 0/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config Mohammad Rafi Shaik
2026-10-15 14:22 ` [PATCH v1 1/2] dt-bindings: pinctrl: qcom,tlmm-common: Add wakeup-enable Mohammad Rafi Shaik
2026-10-15 14:32   ` sashiko-bot
2026-10-15 14:23 ` [PATCH v1 2/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config Mohammad Rafi Shaik
2026-10-15 14:30   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.