pinctrl: st: Pass irqchip when adding gpiochip
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 1 Oct 2019 13:51:47 +0000 (15:51 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 16 Oct 2019 11:45:27 +0000 (13:45 +0200)
commitc77a4de2bbf36d26560c430a6578fdbdd04f6f9c
tree868907170373bb201bc63bb9e139430af839b003
parent35dea5d746b2ba5f56fe3562d6cc1843a632d471
pinctrl: st: Pass irqchip when adding gpiochip

We need to convert all old gpio irqchips to pass the irqchip
setup along when adding the gpio_chip. For more info see
drivers/gpio/TODO.

For chained irqchips this is a pretty straight-forward
conversion: the ST pin controller errors out of adding a
irqchip if the interrupt is invalid or missing or if the
irqmux is not present: the irqchip should not be added
if either of these errors happen, so rewrite the code to
deal with that. Keep the exit path where the gpio_chip
is added no matter what the status of the irq is.

Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20191001135147.29416-1-linus.walleij@linaro.org
drivers/pinctrl/pinctrl-st.c