mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
pinctrl: renesas: rza1: 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: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250611-gpiochip-set-rv-pinctrl-renesas-v1-3-ad169a794ef0@linaro.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
146ea9380f
commit
c5eab2dfdb
|
|
@ -830,12 +830,13 @@ static int rza1_gpio_get(struct gpio_chip *chip, unsigned int gpio)
|
|||
return rza1_pin_get(port, gpio);
|
||||
}
|
||||
|
||||
static void rza1_gpio_set(struct gpio_chip *chip, unsigned int gpio,
|
||||
int value)
|
||||
static int rza1_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
|
||||
{
|
||||
struct rza1_port *port = gpiochip_get_data(chip);
|
||||
|
||||
rza1_pin_set(port, gpio, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct gpio_chip rza1_gpiochip_template = {
|
||||
|
|
@ -845,7 +846,7 @@ static const struct gpio_chip rza1_gpiochip_template = {
|
|||
.direction_input = rza1_gpio_direction_input,
|
||||
.direction_output = rza1_gpio_direction_output,
|
||||
.get = rza1_gpio_get,
|
||||
.set = rza1_gpio_set,
|
||||
.set_rv = rza1_gpio_set,
|
||||
};
|
||||
/* ----------------------------------------------------------------------------
|
||||
* pinctrl operations
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user