Message ID | 1623938053-790-1-git-send-email-loic.poulain@linaro.org |
---|---|
State | Accepted |
Commit | 3093e6cca3ba7d47848068cb256c489675125181 |
Headers | show |
Series | gpio: mxc: Fix disabled interrupt wake-up support | expand |
On Thu, Jun 17, 2021 at 3:44 PM Loic Poulain <loic.poulain@linaro.org> wrote: > A disabled/masked interrupt marked as wakeup source must be re-enable > and unmasked in order to be able to wake-up the host. That can be done > by flaging the irqchip with IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. > > Note: It 'sometimes' works without that change, but only thanks to the > lazy generic interrupt disabling (keeping interrupt unmasked). > > Reported-by: Michal Koziel <michal.koziel@emlogic.no> > Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Looks correct: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Thu, Jun 17, 2021 at 3:44 PM Loic Poulain <loic.poulain@linaro.org> wrote: > > A disabled/masked interrupt marked as wakeup source must be re-enable > and unmasked in order to be able to wake-up the host. That can be done > by flaging the irqchip with IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. > > Note: It 'sometimes' works without that change, but only thanks to the > lazy generic interrupt disabling (keeping interrupt unmasked). > > Reported-by: Michal Koziel <michal.koziel@emlogic.no> > Signed-off-by: Loic Poulain <loic.poulain@linaro.org> > --- > Applied for fixes, thanks! Bartosz
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 157106e..b9fdf05 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -334,7 +334,7 @@ static int mxc_gpio_init_gc(struct mxc_gpio_port *port, int irq_base) ct->chip.irq_unmask = irq_gc_mask_set_bit; ct->chip.irq_set_type = gpio_set_irq_type; ct->chip.irq_set_wake = gpio_set_wake_irq; - ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND; + ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND; ct->regs.ack = GPIO_ISR; ct->regs.mask = GPIO_IMR;
A disabled/masked interrupt marked as wakeup source must be re-enable and unmasked in order to be able to wake-up the host. That can be done by flaging the irqchip with IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. Note: It 'sometimes' works without that change, but only thanks to the lazy generic interrupt disabling (keeping interrupt unmasked). Reported-by: Michal Koziel <michal.koziel@emlogic.no> Signed-off-by: Loic Poulain <loic.poulain@linaro.org> --- drivers/gpio/gpio-mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4