mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-21 19:35:23 -04:00
pinctrl: renesas: rzg2l: 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-2-ad169a794ef0@linaro.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
committed by
Geert Uytterhoeven
parent
2c75dc82ed
commit
146ea9380f
@@ -1758,8 +1758,8 @@ static int rzg2l_gpio_direction_input(struct gpio_chip *chip,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rzg2l_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
static int rzg2l_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
{
|
||||
struct rzg2l_pinctrl *pctrl = gpiochip_get_data(chip);
|
||||
const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[offset];
|
||||
@@ -1779,6 +1779,8 @@ static void rzg2l_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
writeb(reg8 & ~BIT(bit), pctrl->base + P(off));
|
||||
|
||||
spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rzg2l_gpio_direction_output(struct gpio_chip *chip,
|
||||
@@ -2788,7 +2790,7 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl)
|
||||
chip->direction_input = rzg2l_gpio_direction_input;
|
||||
chip->direction_output = rzg2l_gpio_direction_output;
|
||||
chip->get = rzg2l_gpio_get;
|
||||
chip->set = rzg2l_gpio_set;
|
||||
chip->set_rv = rzg2l_gpio_set;
|
||||
chip->label = name;
|
||||
chip->parent = pctrl->dev;
|
||||
chip->owner = THIS_MODULE;
|
||||
|
||||
Reference in New Issue
Block a user