Skip to content

Commit acffb7c

Browse files
Bartosz Golaszewskigeertu
authored andcommitted
pinctrl: renesas: rzv2m: 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-4-ad169a794ef0@linaro.org Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent c5eab2d commit acffb7c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/pinctrl/renesas/pinctrl-rzv2m.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -790,14 +790,16 @@ static int rzv2m_gpio_direction_input(struct gpio_chip *chip,
790790
return 0;
791791
}
792792

793-
static void rzv2m_gpio_set(struct gpio_chip *chip, unsigned int offset,
794-
int value)
793+
static int rzv2m_gpio_set(struct gpio_chip *chip, unsigned int offset,
794+
int value)
795795
{
796796
struct rzv2m_pinctrl *pctrl = gpiochip_get_data(chip);
797797
u32 port = RZV2M_PIN_ID_TO_PORT(offset);
798798
u8 bit = RZV2M_PIN_ID_TO_PIN(offset);
799799

800800
rzv2m_writel_we(pctrl->base + DO(port), bit, !!value);
801+
802+
return 0;
801803
}
802804

803805
static int rzv2m_gpio_direction_output(struct gpio_chip *chip,
@@ -955,7 +957,7 @@ static int rzv2m_gpio_register(struct rzv2m_pinctrl *pctrl)
955957
chip->direction_input = rzv2m_gpio_direction_input;
956958
chip->direction_output = rzv2m_gpio_direction_output;
957959
chip->get = rzv2m_gpio_get;
958-
chip->set = rzv2m_gpio_set;
960+
chip->set_rv = rzv2m_gpio_set;
959961
chip->label = name;
960962
chip->parent = pctrl->dev;
961963
chip->owner = THIS_MODULE;

0 commit comments

Comments
 (0)