gpio: davinci: interrupt related fixes
Subsystems (2)
cover gpio: davinci: interrupt related fixes
This series fixes some critical bugs in the gpio-davinci driver that come to light when the system tries to wakeup from a suspended state.
It was earlier posted as an RFC here:
https://lore.kernel.org/all/[email protected]/
No changes, just resending without the RFC tag since the patches are now proposed to be merged into mainline.
Also add all the Acks and R-by's from respective maintainers and reviewers.
Dhruva Gole (2):
gpio: davinci: Do not clear the bank intr enable bit in save_context
gpio: davinci: Add irq chip flag to skip set wake
drivers/gpio/gpio-davinci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 gpio: davinci: Do not clear the bank intr enable bit in save_context
The interrupt enable bits might be set if we want to use the GPIO as wakeup source. Clearing this will mean disabling of interrupts in the GPIO banks that we may want to wakeup from.
Thus remove the line that was clearing this bit from the driver's save context function.
--- drivers/gpio/gpio-davinci.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpio/gpio-davinci.c +0 -3
@@ -639,9 +639,6 @@ static void davinci_gpio_save_context(struct davinci_gpio_controller *chips, context->set_falling =readl_relaxed (&g->set_falling); } -/* Clear Bank interrupt enable bit */ -writel_relaxed (0 , base +BINTEN ); -/* Clear all interrupt status registers */ writel_relaxed (GENMASK (31 ,0 ), &g->intstat); }
Signature · 1 line
2.25.1
PATCH 2/2 gpio: davinci: Add irq chip flag to skip set wake
In reply to Dhruva GoleAdd the IRQCHIP_SKIP_SET_WAKE flag since there are no special IRQ Wake bits that can be set to enable wakeup IRQ.
--- drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-davinci.c +1 -1
@@ -322,7 +322,7 @@ static struct irq_chip gpio_irqchip = { .irq_enable = gpio_irq_enable, .irq_disable = gpio_irq_disable, .irq_set_type = gpio_irq_type, - .flags = IRQCHIP_SET_TYPE_MASKED, + .flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE, };static void gpio_irq_handler (struct irq_desc *desc)
Signature · 1 line
2.25.1
Bartosz Golaszewski
AppliedQuoted 23 lines · Dhruva Gole
This series fixes some critical bugs in the gpio-davinci driver that come to light when the system tries to wakeup from a suspended state.
It was earlier posted as an RFC here:
https://lore.kernel.org/all/[email protected]/No changes, just resending without the RFC tag since the patches are now proposed to be merged into mainline.
Also add all the Acks and R-by's from respective maintainers and reviewers.Cc Keerthy <[email protected]>Cc Bartosz Golaszewski <[email protected]>Cc Linus Walleij <[email protected]>Cc Devarsh Thakkar <[email protected]>Cc Tony Lindgren <[email protected]>Cc Vibhore Vardhan <[email protected]>Dhruva Gole (2):
gpio: davinci: Do not clear the bank intr enable bit insave_context
gpio: davinci: Add irq chip flag to skip set wake
Quoted 6 lines
drivers/gpio/gpio-davinci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)--
2.25.1
Queued for fixes. Thanks!
Bart