[PATCH 1/7] gpio: rcar: Convert to gpiochip_generic_{request,free}()

Geert Uytterhoeven geert+renesas at glider.be
Fri Oct 23 10:50:39 PDT 2026


When a gpio device node has no gpio-ranges property,
pinctrl_gpio_request() returns -EPROBE_DEFER and its GPIOs are unusable.

Restore the ability to use GPIOs before pin control support is added by
using the gpiolib helpers instead, which cater for this use case.

Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
---
 drivers/gpio/gpio-rcar.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 54dc47d45de7e861..1192e1f1c6db8433 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -15,7 +15,6 @@
 #include <linux/irq.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/spinlock.h>
@@ -309,7 +308,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
 		return error;
 	}
 
-	error = pinctrl_gpio_request(chip, offset);
+	error = gpiochip_generic_request(chip, offset);
 	if (error)
 		pm_runtime_put(p->dev);
 
@@ -320,7 +319,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset)
 {
 	struct gpio_rcar_priv *p = gpiochip_get_data(chip);
 
-	pinctrl_gpio_free(chip, offset);
+	gpiochip_generic_free(chip, offset);
 
 	/*
 	 * Set the GPIO as an input to ensure that the next GPIO request won't
-- 
2.43.0




More information about the linux-arm-kernel mailing list