[tip: irq/drivers] irqchip/meson-gpio: Allow the GPIO interrupts to wake the system

From: tip-bot2 for Igor Velkov

Date: Thu Oct 15 2026 - 06:19:14 EST


The following commit has been merged into the irq/drivers branch of tip:

Commit-ID: 5b6e2a46b80ddbc93e72eb4f01519b0c8c3e0ef0
Gitweb: https://git.kernel.org/tip/5b6e2a46b80ddbc93e72eb4f01519b0c8c3e0ef0
Author: Igor Velkov <iav@xxxxxx>
AuthorDate: Sat, 10 Oct 2026 18:20:30
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Thu, 15 Oct 2026 12:07:02 +02:00

irqchip/meson-gpio: Allow the GPIO interrupts to wake the system

meson_gpio_irq_chip has neither .irq_set_wake nor IRQCHIP_SKIP_SET_WAKE,
so enable_irq_wake() fails with -ENXIO for every interrupt routed through
it, and such an interrupt never gets IRQD_WAKEUP_STATE.

That matters for suspend-to-idle. suspend_device_irqs() keeps only the
wakeup interrupts enabled; the rest are suspended and masked by the flow
handler when they first fire. A GPIO interrupt that fires during s2idle
therefore brings a CPU out of idle once, gets masked, and the system
sleeps on. For mem the firmware chooses the wakeup sources, and this
flag changes nothing there.

Set IRQCHIP_SKIP_SET_WAKE, like the other hierarchical irqchips with a
GIC parent. The GIC sets the same flag, so irq_chip_set_wake_parent()
would end there anyway.

Tested on ODROID-HC4 with the PCF8563 alarm interrupt routed through this
controller: with the flag the alarm wakes the board from s2idle 4/4, and
/sys/power/pm_wakeup_irq names it; without the flag the board stayed in
s2idle past the alarm until a power cycle (0/5).

Signed-off-by: Igor Velkov <iav@xxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Assisted-by: LLM
Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Link: https://patch.msgid.link/20261010-meson-gpio-wake-v2-1-790ecc6df792@xxxxxx
---
drivers/irqchip/irq-meson-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
index 91a9c33..e0329ef 100644
--- a/drivers/irqchip/irq-meson-gpio.c
+++ b/drivers/irqchip/irq-meson-gpio.c
@@ -538,7 +538,7 @@ static struct irq_chip meson_gpio_irq_chip = {
#ifdef CONFIG_SMP
.irq_set_affinity = irq_chip_set_affinity_parent,
#endif
- .flags = IRQCHIP_SET_TYPE_MASKED,
+ .flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE,
};

static int meson_gpio_irq_domain_translate(struct irq_domain *domain,