diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-09-26 14:19:52 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-26 14:39:08 +0200 |
commit | 3f97d5fcf99cb87f590ffe1d9422b2a26a8ef3ed (patch) | |
tree | fd68ce986e6042edebb64bf8ad51aa7f222503f7 /drivers/gpio/gpio-tc3589x.c | |
parent | 83141a771975f4e54402ab05e5cbbc3c56f45bdd (diff) | |
download | talos-op-linux-3f97d5fcf99cb87f590ffe1d9422b2a26a8ef3ed.tar.gz talos-op-linux-3f97d5fcf99cb87f590ffe1d9422b2a26a8ef3ed.zip |
gpio: handle also nested irqchips in the chained handler set-up
To unify how we connect cascaded IRQ chips to parent IRQs, if
NULL us passed as handler to the gpiochip_set_chained_irqchip()
function, assume the chips is nested rather than chained, and
we still get the parent set up correctly by way of this function
call.
Alter the drivers for tc3589x and stmpe to use this to set up
their chained handlers as a demonstration of the usage.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-tc3589x.c')
-rw-r--r-- | drivers/gpio/gpio-tc3589x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index 7324869c38e0..ae0f6466eb09 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -300,6 +300,11 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) return ret; } + gpiochip_set_chained_irqchip(&tc3589x_gpio->chip, + &tc3589x_gpio_irq_chip, + irq, + NULL); + if (pdata && pdata->setup) pdata->setup(tc3589x, tc3589x_gpio->chip.base); |