Skip to contentSkip to conversation

arm: ipipe: omap-gpio: Fix interrupts delivering

PATCH RESEND In review Dario Binacchi 2 participants 3 messages Sep 26, 2021 – Oct 4, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 arm: ipipe: omap-gpio: Fix interrupts delivering

If you set the irq trigger as edge rising or falling the interrupts are no longer delivered to the upper layers. The gpiokeys driver, for example, no longer detects the change in the state of the pins mapped to the buttons.

Fixes c041e938312b ("arm: ipipe: Fix up the omap-gpio driver to deliver interrupts properly to the pipeline")
---
 drivers/gpio/gpio-omap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpio/gpio-omap.c +1 -4
index c8192c82d2b1..ae527d65bfc2 100644
@@ -577,9 +577,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
 	}
 	raw_spin_unlock_irqrestore(&bank->lock, flags);
 
-#ifdef CONFIG_IPIPE
-	irq_set_handler_locked(d, handle_level_irq);
-#else
 	if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
 		irq_set_handler_locked(d, handle_level_irq);
 	else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
@@ -590,7 +587,7 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
 		 * So just use handle_simple_irq.
 		 */
 		irq_set_handler_locked(d, handle_simple_irq);
-#endif
+
 	return 0;
 
 error:
Signature · 1 line
2.17.1
#1 lore raw
Quoted 36 lines · Dario Binacchi

If you set the irq trigger as edge rising or falling the interrupts are no longer delivered to the upper layers. The gpiokeys driver, for example, no longer detects the change in the state of the pins mapped to the buttons.

Fixes c041e938312b ("arm: ipipe: Fix up the omap-gpio driver to deliver

interrupts properly to the pipeline")

---
 drivers/gpio/gpio-omap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpio/gpio-omap.c +0 -3
index c8192c82d2b1..ae527d65bfc2 100644
@@ -577,9 +577,6 @@ static int omap_gpio_irq_type(struct irq_data *d,
 unsigned type)
        }
        raw_spin_unlock_irqrestore(&bank->lock, flags);
 
-#ifdef CONFIG_IPIPE
-       irq_set_handler_locked(d, handle_level_irq);
-#else
        if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
                irq_set_handler_locked(d, handle_level_irq);

else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))

drivers/gpio/gpio-omap.c +1 -1
@@ -590,7 +587,7 @@ static int omap_gpio_irq_type(struct irq_data *d,
 unsigned type)
                 * So just use handle_simple_irq.
                 */
                irq_set_handler_locked(d, handle_simple_irq);
-#endif
+
        return 0;
 
Quoted 3 lines

error:
--
2.17.1

Thanks, applying to 5.4 and 4.19. I’ll have a. Updated release this week.

Thanks

Greg

Quoted 3 lines
#2 lore raw
Quoted 47 lines · Greg Gallagher
Quoted 36 lines · Dario Binacchi

If you set the irq trigger as edge rising or falling the interrupts are no longer delivered to the upper layers. The gpiokeys driver, for example, no longer detects the change in the state of the pins mapped to the buttons.

Fixes c041e938312b ("arm: ipipe: Fix up the omap-gpio driver to deliver

interrupts properly to the pipeline")

---
 drivers/gpio/gpio-omap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpio/gpio-omap.c +0 -3
index c8192c82d2b1..ae527d65bfc2 100644
@@ -577,9 +577,6 @@ static int omap_gpio_irq_type(struct irq_data *d,
 unsigned type)
        }
        raw_spin_unlock_irqrestore(&bank->lock, flags);
 
-#ifdef CONFIG_IPIPE
-       irq_set_handler_locked(d, handle_level_irq);
-#else
        if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
                irq_set_handler_locked(d, handle_level_irq);

else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))

drivers/gpio/gpio-omap.c +1 -1
@@ -590,7 +587,7 @@ static int omap_gpio_irq_type(struct irq_data *d,
 unsigned type)
                 * So just use handle_simple_irq.
                 */
                irq_set_handler_locked(d, handle_simple_irq);
-#endif
+
        return 0;
 
Quoted 3 lines

error:
--
2.17.1

Thanks, applying to 5.4 and 4.19. I’ll have a. Updated release this week.

Quoted 7 lines

Thanks

Greg

Quoted 3 lines

Applied to master, starting the 4.19 and 5.4 update.

Thanks

-Greg