[PATCH 05/10] pinctrl: meson: use new GPIO line value setter callbacks
Neil Armstrong
neil.armstrong at linaro.org
Tue Apr 8 00:41:33 PDT 2025
On 08/04/2025 09:17, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> struct gpio_chip now has callbacks for setting line values that return
> an integer, allowing to indicate failures. Convert the driver to using
> them.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
> ---
> drivers/pinctrl/meson/pinctrl-meson.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
> index 253a0cc57e39..e7485c82089c 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson.c
> @@ -580,9 +580,9 @@ static int meson_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
> gpio, value);
> }
>
> -static void meson_gpio_set(struct gpio_chip *chip, unsigned gpio, int value)
> +static int meson_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
> {
> - meson_pinconf_set_drive(gpiochip_get_data(chip), gpio, value);
> + return meson_pinconf_set_drive(gpiochip_get_data(chip), gpio, value);
> }
>
> static int meson_gpio_get(struct gpio_chip *chip, unsigned gpio)
> @@ -616,7 +616,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc)
> pc->chip.direction_input = meson_gpio_direction_input;
> pc->chip.direction_output = meson_gpio_direction_output;
> pc->chip.get = meson_gpio_get;
> - pc->chip.set = meson_gpio_set;
> + pc->chip.set_rv = meson_gpio_set;
> pc->chip.base = -1;
> pc->chip.ngpio = pc->data->num_pins;
> pc->chip.can_sleep = false;
>
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
More information about the linux-amlogic
mailing list