gpio: simplify adding threaded interrupts

This tries to simplify the use of CONFIG_GPIOLIB_IRQCHIP when
using threaded interrupts: add a new call
gpiochip_irqchip_add_nested() to indicate that we're dealing
with a nested rather than a chained irqchip, then create a
separate gpiochip_set_nested_irqchip() to mirror
the gpiochip_set_chained_irqchip() call to connect the
parent and child interrupts.

In the nested case gpiochip_set_nested_irqchip() does nothing
more than call irq_set_parent() on each valid child interrupt,
which has little semantic effect in the kernel, but this is
probably still formally correct.

Update all drivers using nested interrupts to use
gpiochip_irqchip_add_nested() so we can now see clearly
which these users are.

The DLN2 driver can drop its specific hack with
.irq_not_threaded as we now recognize whether a chip is
threaded or not from its use of gpiochip_irqchip_add_nested()
signature rather than from inspecting .can_sleep.

We rename the .irq_parent to .irq_chained_parent since this
parent IRQ is only really kept around for the chained
interrupt handlers.

Cc: Lars Poeschel <[email protected]>
Cc: Octavian Purdila <[email protected]>
Cc: Daniel Baluta <[email protected]>
Cc: Bin Gao <[email protected]>
Cc: Mika Westerberg <[email protected]>
Cc: Ajay Thomas <[email protected]>
Cc: Semen Protsenko <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Phil Reid <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
13 files changed