unexpected side effect of "gpiolib: override irq_enable/disable"
From: Linus Walleij <hidden>
Date: 2018-09-13 08:45:28
Also in:
linux-gpio
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:
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