[PATCH 4/5] gpio: omap: convert driver to use gpiolib irqchip

Linus Walleij linus.walleij at linaro.org
Thu Apr 10 10:45:01 PDT 2014


On Thu, Apr 10, 2014 at 7:39 PM, Santosh Shilimkar
<santosh.shilimkar at ti.com> wrote:
> On Sunday 06 April 2014 10:58 AM, Javier Martinez Canillas wrote:

>> +#ifdef CONFIG_ARCH_OMAP1
>> +     /*
>> +      * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
>> +      * irq_alloc_descs() since a base IRQ offset will no longer be needed.
>> +      */
>> +     irq_base = irq_alloc_descs(-1, 0, bank->width, 0);
>> +     if (irq_base < 0) {
>> +             dev_err(bank->dev, "Couldn't allocate IRQ numbers\n");
>> +             return -ENODEV;
>> +     }
>> +#endif
>> +
> Do we still need above after first patch ? Would be good
> to get rid of above ugly #ifdef on the middle of the code.

I don't think so actually, simple irqdomain adds descriptors
for irqbase != 0, and the gpiochip irqchip helpers call
irq_create_mapping() on all offsets.

Preferably a separate patch on top of this removing that code
though so it's bisectable.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list