mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
pinctrl: meson: use new GPIO line value setter callbacks
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@linaro.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/20250408-gpiochip-set-rv-pinctrl-part1-v1-5-c9d521d7c8c7@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
4f15389ba3
commit
18ef5d5b4d
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user