Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -2
+4 -2
drivers/gpio/gpio-cs5535.c
··· 232 232 return cs5535_gpio_isset(offset, GPIO_READ_BACK); 233 233 } 234 234 235 - static void chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val) 235 + static int chip_gpio_set(struct gpio_chip *chip, unsigned int offset, int val) 236 236 { 237 237 if (val) 238 238 cs5535_gpio_set(offset, GPIO_OUTPUT_VAL); 239 239 else 240 240 cs5535_gpio_clear(offset, GPIO_OUTPUT_VAL); 241 + 242 + return 0; 241 243 } 242 244 243 245 static int chip_direction_input(struct gpio_chip *c, unsigned offset) ··· 296 294 .request = chip_gpio_request, 297 295 298 296 .get = chip_gpio_get, 299 - .set = chip_gpio_set, 297 + .set_rv = chip_gpio_set, 300 298 301 299 .direction_input = chip_direction_input, 302 300 .direction_output = chip_direction_output,