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>
This commit is contained in:
Linus Walleij
2014-09-26 14:19:52 +02:00
부모 83141a7719
커밋 3f97d5fcf9
4개의 변경된 파일38개의 추가작업 그리고 22개의 파일을 삭제

파일 보기

@@ -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);