Re: [PATCH 1/2] gpiolib: Add possibility to mask which GPIOs are added to IRQ domain

From: Linus Walleij
Date: Sun Sep 18 2016 - 07:17:12 EST


On Thu, Sep 15, 2016 at 5:52 PM, Mika Westerberg
<mika.westerberg@xxxxxxxxxxxxxxx> wrote:

> When using GPIO irqchip helpers to setup irqchip for a gpiolib based
> driver, it is not possible to select which GPIOs to add to the IRQ domain.
> Instead it just adds all GPIOs which is not always desired. For example
> there might be GPIOs that for some reason just cannot be used as interrupts
> at all.
>
> To make this possible we add valid_mask to each gpio_chip and by default
> assume all GPIOs can be used as interrupts. Drivers can then tune this
> using clear_bit() or similar before they call gpiochip_irqchip_add().
>
> Suggested-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Awesome, nice infrastructure.
Will apply once tglx and Marc's comments are fixed.

Yours,
Linus Walleij