Skip to content

Commit d2fb026

Browse files
Bartosz Golaszewskigeertu
authored andcommitted
pinctrl: renesas: rza2: 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 <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/20250611-gpiochip-set-rv-pinctrl-renesas-v1-5-ad169a794ef0@linaro.org Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent acffb7c commit d2fb026

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/pinctrl/renesas/pinctrl-rza2.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ static int rza2_chip_get(struct gpio_chip *chip, unsigned int offset)
172172
return !!(readb(priv->base + RZA2_PIDR(port)) & BIT(pin));
173173
}
174174

175-
static void rza2_chip_set(struct gpio_chip *chip, unsigned int offset,
176-
int value)
175+
static int rza2_chip_set(struct gpio_chip *chip, unsigned int offset, int value)
177176
{
178177
struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip);
179178
u8 port = RZA2_PIN_ID_TO_PORT(offset);
@@ -188,6 +187,8 @@ static void rza2_chip_set(struct gpio_chip *chip, unsigned int offset,
188187
new_value &= ~BIT(pin);
189188

190189
writeb(new_value, priv->base + RZA2_PODR(port));
190+
191+
return 0;
191192
}
192193

193194
static int rza2_chip_direction_output(struct gpio_chip *chip,
@@ -236,7 +237,7 @@ static struct gpio_chip chip = {
236237
.direction_input = rza2_chip_direction_input,
237238
.direction_output = rza2_chip_direction_output,
238239
.get = rza2_chip_get,
239-
.set = rza2_chip_set,
240+
.set_rv = rza2_chip_set,
240241
};
241242

242243
static int rza2_gpio_register(struct rza2_pinctrl_priv *priv)

0 commit comments

Comments
 (0)