Thread (11 messages) 11 messages, 3 authors, 2018-09-14

unexpected side effect of "gpiolib: override irq_enable/disable"

From: Linus Walleij <hidden>
Date: 2018-09-13 08:45:28
Also in: linux-gpio

On Wed, Sep 12, 2018 at 5:30 PM Hans Verkuil [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Can you try this patch first?

Thanks!

        Hans

Signed-off-by: Hans Verkuil <redacted>
---
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index efce534a269b..e09e4e439928 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1859,6 +1859,8 @@ static void gpiochip_set_irq_hooks(struct gpio_chip *gpiochip)
        }
        if (WARN_ON(gpiochip->irq.irq_enable))
                return;
+       if (irqchip->irq_enable == gpiochip_irq_enable)
+               return;
This or somthing like it (like keeping some cookie around to see
if we use the same irqchip) makes sense to me.

drivers/pinctrl/nomadik/* also use the same irqchip twice, and
I bet some more.

Looking forward to proper patch.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help