summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-10-03 09:25:29 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-11-04 10:23:18 +0100
commite3d3ab299ba63c61776f3579d8a58c486eba5044 (patch)
tree59b47907bab9495a9b1efb65be4456fe263440c2
parentec963d04ca8651cc3738bc8e013b3ab7fdb95e3d (diff)
gpiolib: generic: use new pinctrl GPIO helpers
Replace the pinctrl helpers taking the global GPIO number as argument with the improved variants that instead take a pointer to the GPIO chip and the controller-relative offset. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpiolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 1c3c284fa44e..35023129c806 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2014,7 +2014,7 @@ int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset)
return 0;
#endif
- return pinctrl_gpio_request(gc->gpiodev->base + offset);
+ return pinctrl_gpio_request_new(gc, offset);
}
EXPORT_SYMBOL_GPL(gpiochip_generic_request);
@@ -2030,7 +2030,7 @@ void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset)
return;
#endif
- pinctrl_gpio_free(gc->gpiodev->base + offset);
+ pinctrl_gpio_free_new(gc, offset);
}
EXPORT_SYMBOL_GPL(gpiochip_generic_free);
@@ -2043,7 +2043,7 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free);
int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset,
unsigned long config)
{
- return pinctrl_gpio_set_config(gc->gpiodev->base + offset, config);
+ return pinctrl_gpio_set_config_new(gc, offset, config);
}
EXPORT_SYMBOL_GPL(gpiochip_generic_config);