Message ID | CABxcv=n_B4qDrgunKnyiY9769xPYOssi3ESAysiXU2ek9Zt2Xg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Apr 23, 2014 at 4:50 PM, Javier Martinez Canillas <javier@dowhile0.org> wrote: > What do you think about the following patch? Although I agree that if > we can use IRQ_TYPE_NONE as you propose then tht is a much better and > efficient solution that this patch. Let's try IRQ_TYPE_NONE first and if that fails we go back to this. I've pushed the current patch to linux-next. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 8cc9e91..2e23858 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1101,6 +1101,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank) gpio += bank->width; } bank->chip.ngpio = bank->width; + bank->chip.set_irq_default = false; ret = gpiochip_add(&bank->chip); if (ret) { diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c12fe9d..f12aea3 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1402,7 +1402,8 @@ static int gpiochip_irq_map(struct irq_domain *d, unsigned int irq, #else irq_set_noprobe(irq); #endif - irq_set_irq_type(irq, chip->irq_default_type); + if (chip->set_irq_default) + irq_set_irq_type(irq, chip->irq_default_type); return 0; } diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 573e4f3..168c93e 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -113,6 +113,7 @@ struct gpio_chip { unsigned int irq_base; irq_flow_handler_t irq_handler; unsigned int irq_default_type; + bool set_irq_default; #endif #if defined(CONFIG_OF_GPIO)