]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: Allow per-parent interrupt data
authorMarc Zyngier <maz@kernel.org>
Tue, 26 Oct 2021 17:58:11 +0000 (18:58 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 26 Oct 2021 22:16:00 +0000 (00:16 +0200)
commit01e6b9d922316548de955d0b7cce31dc4c2181b4
treedf4d6b96d951f7c7fe7e2891af335c25236378f5
parentb901123b83fca756ffcd85ea50a6cd9637d66d0c
gpio: Allow per-parent interrupt data

The core gpiolib code is able to deal with multiple interrupt parents
for a single gpio irqchip. It however only allows a single piece
of data to be conveyed to all flow handlers (either the gpio_chip
or some other, driver-specific data).

This means that drivers have to go through some interesting dance
to find the correct context, something that isn't great in interrupt
context (see 46373165a07471f21b4cac8f49a1b535c6d14d34 for a prime
example).

Instead, offer an optional way for a pinctrl/gpio driver to provide
an array of pointers which gets used to provide the correct context
to the flow handler.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20211026175815.52703-2-joey.gouly@arm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h