diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-03-10 13:40:27 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-03-17 08:27:41 +0100 |
commit | 588dfcdb162855b954f92fce73a12e3fa86ded01 (patch) | |
tree | 9158ff71d2a41484017d8ea47aad2e9035750805 | |
parent | 96498b83b3ded5f01207775d681374d62111d548 (diff) |
gpio: cs5535: use new 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.
Link: https://lore.kernel.org/r/20250310-gpiochip-set-conversion-v1-13-03798bb833eb@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-cs5535.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c index 6da3a247614a..143d1f4173a6 100644 --- a/drivers/gpio/gpio-cs5535.c +++ b/drivers/gpio/gpio-cs5535.c @@ -232,12 +232,14 @@ static int chip_gpio_get(struct gpio_chip *chip, unsigned offset) return cs5535_gpio_isset(offset, GPIO_READ_BACK); } -static void chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val) +static int chip_gpio_set(struct gpio_chip *chip, unsigned int offset, int val) { if (val) cs5535_gpio_set(offset, GPIO_OUTPUT_VAL); else cs5535_gpio_clear(offset, GPIO_OUTPUT_VAL); + + return 0; } static int chip_direction_input(struct gpio_chip *c, unsigned offset) @@ -294,7 +296,7 @@ static struct cs5535_gpio_chip cs5535_gpio_chip = { .request = chip_gpio_request, .get = chip_gpio_get, - .set = chip_gpio_set, + .set_rv = chip_gpio_set, .direction_input = chip_direction_input, .direction_output = chip_direction_output, |