Skip to content

Commit 4302326

Browse files
Haibo ChenBartosz Golaszewski
authored andcommitted
gpio: vf610: mask the gpio irq in system suspend and support wakeup
Add flag IRQCHIP_MASK_ON_SUSPEND to make sure gpio irq is masked on suspend, if lack this flag, current irq arctitecture will not mask the irq, and these unmasked gpio irq will wrongly wakeup the system even they are not config as wakeup source. Also add flag IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND to make sure the gpio irq which is configed as wakeup source can work as expect. Fixes: 7f2691a ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid") Signed-off-by: Haibo Chen <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 5872080 commit 4302326

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpio-vf610.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ static const struct irq_chip vf610_irqchip = {
246246
.irq_unmask = vf610_gpio_irq_unmask,
247247
.irq_set_type = vf610_gpio_irq_set_type,
248248
.irq_set_wake = vf610_gpio_irq_set_wake,
249-
.flags = IRQCHIP_IMMUTABLE,
249+
.flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND
250+
| IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND,
250251
GPIOCHIP_IRQ_RESOURCE_HELPERS,
251252
};
252253

0 commit comments

Comments
 (0)