[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230529074227.636933-1-jiawenwu@trustnetic.com>
Date: Mon, 29 May 2023 15:42:27 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: linus.walleij@...aro.org, brgl@...ev.pl, andy.shevchenko@...il.com,
shreeya.patel@...labora.com, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Jiawen Wu <jiawenwu@...stnetic.com>
Subject: [PATCH] gpiolib: Fix GPIO chip IRQ initialization restriction
In case of gpio-regmap, IRQ chip is added by regmap-irq and associated with
GPIO chip by gpiochip_irqchip_add_domain(). The initialization flag was not
added in gpiochip_irqchip_add_domain(), causing gpiochip_to_irq() to return
-EPROBE_DEFER.
Fixes: 5467801f1fcb ("gpio: Restrict usage of GPIO chip irq members before initialization")
Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: shreeya.patel@...labora.com
---
drivers/gpio/gpiolib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 04fb05df805b..1b6cd4ffb761 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1789,6 +1789,7 @@ int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
gc->to_irq = gpiochip_to_irq;
gc->irq.domain = domain;
+ gc->irq.initialized = true;
return 0;
}
--
2.27.0
Powered by blists - more mailing lists