aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-of.c
diff options
context:
space:
mode:
authorYixun Lan <[email protected]>2025-04-08 15:11:20 +0000
committerBartosz Golaszewski <[email protected]>2025-04-08 16:56:19 +0000
commit27986833e8e675b6c17654d13623590a46f9033e (patch)
tree6103dd307f96e2cb75a9654254d6b22e9c2754d3 /drivers/gpio/gpiolib-of.c
parentMerge tag 'irqdomain-04-08-25' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadkernel-27986833e8e675b6c17654d13623590a46f9033e.tar.gz
kernel-27986833e8e675b6c17654d13623590a46f9033e.zip
gpiolib: support parsing gpio three-cell interrupts scheme
gpio irq which using three-cell scheme should always call instance_match() function to find the correct irqdomain. The select() function will be called with !DOMAIN_BUS_ANY, so for specific gpio irq driver, it need to set bus token explicitly, something like: irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED); Signed-off-by: Yixun Lan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r--drivers/gpio/gpiolib-of.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index f29143c71e9d..3651c4178b81 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -1285,3 +1285,11 @@ void of_gpiochip_remove(struct gpio_chip *chip)
{
of_node_put(dev_of_node(&chip->gpiodev->dev));
}
+
+bool of_gpiochip_instance_match(struct gpio_chip *gc, unsigned int index)
+{
+ if (gc->of_node_instance_match)
+ return gc->of_node_instance_match(gc, index);
+
+ return false;
+}