* [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
@ 2026-06-16 11:54 Sneh Mankad
2026-06-18 8:49 ` Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sneh Mankad @ 2026-06-16 11:54 UTC (permalink / raw)
To: Bjorn Andersson, Linus Walleij, Neil Armstrong,
Krzysztof Kozlowski
Cc: linux-arm-msm, linux-gpio, linux-kernel, stable, Sneh Mankad,
Maulik Shah
GPIO interrupts that are wakeup capable need to be forwarded to wakeup
capable parent irqchip. This is done via writing to it's wakeup_enable bit.
Currently the bit is set only for PDC irqchip by checking skip_wake_irqs.
skip_wake_irqs is set to differentiate between parent irqchips MPM and
PDC. It is set when the parent irqchip is PDC to inform pinctrl about
skipping the IRQ setting up at TLMM.
However, the functionality to forward GPIO interrupts during SoC low
power mode is needed regardless of which parent irqchip it is.
Without the functionality it is impossible for MPM irqchip to detect the
GPIO interrupt during SoC low power mode since for MPM irqchip the
skip_wake_irqs is always false.
Remove skip_wake_irqs condition when setting wakeup enable bit to allow
forwarding GPIO interrupts for SoCs using MPM irqchip too.
Fixes: 76b446f5b86e ("pinctrl: qcom: handle intr_target_reg wakeup_present/enable bits")
Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
---
Changes in v3:
- Added explanation about skip_wake_irqs in commit message.
- Link to v2: https://lore.kernel.org/r/20260430-enable_wakeup_capable_gpios-v2-1-8c26ac795318@oss.qualcomm.com
Changes in v2:
- Modified comment to specify MPM HW as well.
- Spelling correction.
- Link to v1: https://lore.kernel.org/r/20260430-enable_wakeup_capable_gpios-v1-1-5de39bf06094@oss.qualcomm.com
---
drivers/pinctrl/qcom/pinctrl-msm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 45b3a2763eb85405fecdd4770ba3d4ab684563f0..6a24f9b5e4a979528ba6b5b87fd297c2783ec765 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -1242,12 +1242,12 @@ static int msm_gpio_irq_reqres(struct irq_data *d)
/*
* If the wakeup_enable bit is present and marked as available for the
* requested GPIO, it should be enabled when the GPIO is marked as
- * wake irq in order to allow the interrupt event to be transfered to
- * the PDC HW.
+ * wake irq in order to allow the interrupt event to be transferred to
+ * the PDC/MPM HW.
* While the name implies only the wakeup event, it's also required for
* the interrupt event.
*/
- if (test_bit(d->hwirq, pctrl->skip_wake_irqs) && g->intr_wakeup_present_bit) {
+ if (g->intr_wakeup_present_bit) {
u32 intr_cfg;
raw_spin_lock_irqsave(&pctrl->lock, flags);
@@ -1275,7 +1275,7 @@ static void msm_gpio_irq_relres(struct irq_data *d)
unsigned long flags;
/* Disable the wakeup_enable bit if it has been set in msm_gpio_irq_reqres() */
- if (test_bit(d->hwirq, pctrl->skip_wake_irqs) && g->intr_wakeup_present_bit) {
+ if (g->intr_wakeup_present_bit) {
u32 intr_cfg;
raw_spin_lock_irqsave(&pctrl->lock, flags);
---
base-commit: b4e07588e743c989499ca24d49e752c074924a9a
change-id: 20260430-enable_wakeup_capable_gpios-cb9439ae8772
Best regards,
--
Sneh Mankad <sneh.mankad@oss.qualcomm.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
2026-06-16 11:54 [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable Sneh Mankad
@ 2026-06-18 8:49 ` Konrad Dybcio
2026-06-25 4:33 ` Sneh Mankad
2026-06-30 11:43 ` Linus Walleij
2026-06-30 14:52 ` Bartosz Golaszewski
2 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2026-06-18 8:49 UTC (permalink / raw)
To: Sneh Mankad, Bjorn Andersson, Linus Walleij, Neil Armstrong,
Krzysztof Kozlowski
Cc: linux-arm-msm, linux-gpio, linux-kernel, stable, Maulik Shah
On 6/16/26 1:54 PM, Sneh Mankad wrote:
> GPIO interrupts that are wakeup capable need to be forwarded to wakeup
> capable parent irqchip. This is done via writing to it's wakeup_enable bit.
>
> Currently the bit is set only for PDC irqchip by checking skip_wake_irqs.
> skip_wake_irqs is set to differentiate between parent irqchips MPM and
> PDC. It is set when the parent irqchip is PDC to inform pinctrl about
> skipping the IRQ setting up at TLMM.
>
> However, the functionality to forward GPIO interrupts during SoC low
> power mode is needed regardless of which parent irqchip it is.
> Without the functionality it is impossible for MPM irqchip to detect the
> GPIO interrupt during SoC low power mode since for MPM irqchip the
> skip_wake_irqs is always false.
This is a much better commit message, thank you!
One question remains - should we set skip_wake_irqs for MPM too?
My understanding is that no, since the MPM HW is simpler and doesn't
have a register for acking IRQs, so we need to do it from the recipient
(TLMM). Is that right?
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
2026-06-18 8:49 ` Konrad Dybcio
@ 2026-06-25 4:33 ` Sneh Mankad
2026-06-25 7:59 ` Konrad Dybcio
0 siblings, 1 reply; 6+ messages in thread
From: Sneh Mankad @ 2026-06-25 4:33 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Linus Walleij, Neil Armstrong,
Krzysztof Kozlowski
Cc: linux-arm-msm, linux-gpio, linux-kernel, stable, Maulik Shah
[...]
>
> This is a much better commit message, thank you!
>
> One question remains - should we set skip_wake_irqs for MPM too?
>
> My understanding is that no, since the MPM HW is simpler and doesn't
> have a register for acking IRQs, so we need to do it from the recipient
> (TLMM). Is that right?
>
Yes that is correct. skip_wake_irqs is set for PDC since PDC can handle interrupts
during active time and SoC sleep time both, so any wakeup capable interrupt source can
be handled via PDC at all times. However MPM can only handle interrupts when
SoC is in low power mode, it does not have the functionality to detect them when SoC
is active. skip_wake_irqs differentiates this behaviour.
Thanks,
Sneh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
2026-06-25 4:33 ` Sneh Mankad
@ 2026-06-25 7:59 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-06-25 7:59 UTC (permalink / raw)
To: Sneh Mankad, Bjorn Andersson, Linus Walleij, Neil Armstrong,
Krzysztof Kozlowski
Cc: linux-arm-msm, linux-gpio, linux-kernel, stable, Maulik Shah
On 6/25/26 6:33 AM, Sneh Mankad wrote:
>
>
> [...]
>>
>> This is a much better commit message, thank you!
>>
>> One question remains - should we set skip_wake_irqs for MPM too?
>>
>> My understanding is that no, since the MPM HW is simpler and doesn't
>> have a register for acking IRQs, so we need to do it from the recipient
>> (TLMM). Is that right?
>>
> Yes that is correct. skip_wake_irqs is set for PDC since PDC can handle interrupts
> during active time and SoC sleep time both, so any wakeup capable interrupt source can
> be handled via PDC at all times. However MPM can only handle interrupts when
> SoC is in low power mode, it does not have the functionality to detect them when SoC
> is active. skip_wake_irqs differentiates this behaviour.
Thank you!
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
2026-06-16 11:54 [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable Sneh Mankad
2026-06-18 8:49 ` Konrad Dybcio
@ 2026-06-30 11:43 ` Linus Walleij
2026-06-30 14:52 ` Bartosz Golaszewski
2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2026-06-30 11:43 UTC (permalink / raw)
To: Sneh Mankad, Bartosz Golaszewski
Cc: Bjorn Andersson, Neil Armstrong, Krzysztof Kozlowski,
linux-arm-msm, linux-gpio, linux-kernel, stable, Maulik Shah
On Tue, Jun 16, 2026 at 12:55 PM Sneh Mankad
<sneh.mankad@oss.qualcomm.com> wrote:
> GPIO interrupts that are wakeup capable need to be forwarded to wakeup
> capable parent irqchip. This is done via writing to it's wakeup_enable bit.
LGTM and Konrad has ACKed it, Bartosz will queue this patch if he's
also happy with it.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
2026-06-16 11:54 [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable Sneh Mankad
2026-06-18 8:49 ` Konrad Dybcio
2026-06-30 11:43 ` Linus Walleij
@ 2026-06-30 14:52 ` Bartosz Golaszewski
2 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2026-06-30 14:52 UTC (permalink / raw)
To: Bjorn Andersson, Linus Walleij, Neil Armstrong,
Krzysztof Kozlowski, Sneh Mankad
Cc: Bartosz Golaszewski, linux-arm-msm, linux-gpio, linux-kernel,
stable, Maulik Shah
On Tue, 16 Jun 2026 17:24:53 +0530, Sneh Mankad wrote:
> GPIO interrupts that are wakeup capable need to be forwarded to wakeup
> capable parent irqchip. This is done via writing to it's wakeup_enable bit.
>
> Currently the bit is set only for PDC irqchip by checking skip_wake_irqs.
> skip_wake_irqs is set to differentiate between parent irqchips MPM and
> PDC. It is set when the parent irqchip is PDC to inform pinctrl about
> skipping the IRQ setting up at TLMM.
>
> [...]
Applied, thanks!
[1/1] pinctrl: qcom: Unconditionally mark gpio as wakeup enable
https://git.kernel.org/brgl/c/859e02a369ab328a77dfcabf59562100e55f9c5c
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-30 14:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16 11:54 [PATCH v3] pinctrl: qcom: Unconditionally mark gpio as wakeup enable Sneh Mankad
2026-06-18 8:49 ` Konrad Dybcio
2026-06-25 4:33 ` Sneh Mankad
2026-06-25 7:59 ` Konrad Dybcio
2026-06-30 11:43 ` Linus Walleij
2026-06-30 14:52 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox