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>
This commit is contained in:
Bartosz Golaszewski 2023-10-03 09:25:29 +02:00
parent ec963d04ca
commit e3d3ab299b

View File

@ -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);