gpio: thunderx: Switch to GPIOLIB_IRQCHIP
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 8 Aug 2019 12:32:40 +0000 (14:32 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Aug 2019 07:44:19 +0000 (09:44 +0200)
commita7fc89f9d5fcc10a5474cfe555f5a9e5df8b0f1f
treee5c86137ae172def039ac434bb84a11ecbcb00ae
parent821c76c4c374adf0c7a7608ee4661aa801f3c1c5
gpio: thunderx: Switch to GPIOLIB_IRQCHIP

Use the new infrastructure for hierarchical irqchips in
gpiolib.

The major part of the rewrite was dues to the fact that
the driver was passing around a per-irq pointer to
struct thunderx_line * data container, and the central
handlers will assume struct gpio_chip * to be passed
to we need to use the hwirq as index to look up the
struct thunderx_line * for each IRQ.

The pushing and pop:ing of the irqdomain was confusing
because I've never seen this before, but I tried to
replicate it as best I could.

I have no chance to test or debug this so I need
help.

Cc: David Daney <david.daney@cavium.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Brian Masney <masneyb@onstation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190808123242.5359-4-linus.walleij@linaro.org
drivers/gpio/Kconfig
drivers/gpio/gpio-thunderx.c