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

gpio: aspeed: 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/20250303-gpiochip-set-conversion-v1-13-1d5cceeebf8b@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+4 -3
+4 -3
drivers/gpio/gpio-aspeed.c
··· 424 424 gpio->config->llops->reg_bit_get(gpio, offset, reg_val); 425 425 } 426 426 427 - static void aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset, 428 - int val) 427 + static int aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset, int val) 429 428 { 430 429 struct aspeed_gpio *gpio = gpiochip_get_data(gc); 431 430 bool copro = false; ··· 437 438 438 439 if (copro) 439 440 aspeed_gpio_copro_release(gpio, offset); 441 + 442 + return 0; 440 443 } 441 444 442 445 static int aspeed_gpio_dir_in(struct gpio_chip *gc, unsigned int offset) ··· 1352 1351 gpio->chip.request = aspeed_gpio_request; 1353 1352 gpio->chip.free = aspeed_gpio_free; 1354 1353 gpio->chip.get = aspeed_gpio_get; 1355 - gpio->chip.set = aspeed_gpio_set; 1354 + gpio->chip.set_rv = aspeed_gpio_set; 1356 1355 gpio->chip.set_config = aspeed_gpio_set_config; 1357 1356 gpio->chip.label = dev_name(&pdev->dev); 1358 1357 gpio->chip.base = -1;