Skip to content

Commit c72e61b

Browse files
author
Bartosz Golaszewski
committed
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>
1 parent 4cdc191 commit c72e61b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/gpio/gpio-aspeed.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ static void __aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
424424
gpio->config->llops->reg_bit_get(gpio, offset, reg_val);
425425
}
426426

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)
429428
{
430429
struct aspeed_gpio *gpio = gpiochip_get_data(gc);
431430
bool copro = false;
@@ -438,6 +437,8 @@ static void aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
438437

439438
if (copro)
440439
aspeed_gpio_copro_release(gpio, offset);
440+
441+
return 0;
441442
}
442443

443444
static int aspeed_gpio_dir_in(struct gpio_chip *gc, unsigned int offset)
@@ -1351,7 +1352,7 @@ static int aspeed_gpio_probe(struct platform_device *pdev)
13511352
gpio->chip.request = aspeed_gpio_request;
13521353
gpio->chip.free = aspeed_gpio_free;
13531354
gpio->chip.get = aspeed_gpio_get;
1354-
gpio->chip.set = aspeed_gpio_set;
1355+
gpio->chip.set_rv = aspeed_gpio_set;
13551356
gpio->chip.set_config = aspeed_gpio_set_config;
13561357
gpio->chip.label = dev_name(&pdev->dev);
13571358
gpio->chip.base = -1;

0 commit comments

Comments
 (0)