aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-davinci.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2025-02-20 09:57:11 +0000
committerBartosz Golaszewski <[email protected]>2025-02-26 10:17:40 +0000
commitf01436c2a038fe8d7b69a5fe701ab98028ce5cc4 (patch)
tree2cca470ef6f6d9f29b8f473d60b8e0c7c9d11d15 /drivers/gpio/gpio-davinci.c
parentgpio: latch: use value returning setters (diff)
downloadkernel-f01436c2a038fe8d7b69a5fe701ab98028ce5cc4.tar.gz
kernel-f01436c2a038fe8d7b69a5fe701ab98028ce5cc4.zip
gpio: davinci: use value returning setters
struct gpio_chip now has additional variants of the set(_multiple) driver callbacks that return an integer to indicate success or failure. Convert the driver to using them. Reviewed-by: Linus Walleij <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-davinci.c')
-rw-r--r--drivers/gpio/gpio-davinci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 8c033e8cf3c9..63fc7888c1d4 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -139,7 +139,7 @@ static int davinci_gpio_get(struct gpio_chip *chip, unsigned offset)
/*
* Assuming the pin is muxed as a gpio output, set its output value.
*/
-static void
+static int
davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{
struct davinci_gpio_controller *d = gpiochip_get_data(chip);
@@ -150,6 +150,8 @@ davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
writel_relaxed(__gpio_mask(offset),
value ? &g->set_data : &g->clr_data);
+
+ return 0;
}
static int davinci_gpio_probe(struct platform_device *pdev)
@@ -209,7 +211,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
chips->chip.direction_input = davinci_direction_in;
chips->chip.get = davinci_gpio_get;
chips->chip.direction_output = davinci_direction_out;
- chips->chip.set = davinci_gpio_set;
+ chips->chip.set_rv = davinci_gpio_set;
chips->chip.ngpio = ngpio;
chips->chip.base = -1;