forked from mirrors/linux
gpio: eic-sprd: 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. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-2-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
afb4aed832
commit
21d3c6531b
1 changed files with 3 additions and 2 deletions
|
|
@ -203,9 +203,10 @@ static int sprd_eic_direction_input(struct gpio_chip *chip, unsigned int offset)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sprd_eic_set(struct gpio_chip *chip, unsigned int offset, int value)
|
||||
static int sprd_eic_set(struct gpio_chip *chip, unsigned int offset, int value)
|
||||
{
|
||||
/* EICs are always input, nothing need to do here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sprd_eic_set_debounce(struct gpio_chip *chip, unsigned int offset,
|
||||
|
|
@ -662,7 +663,7 @@ static int sprd_eic_probe(struct platform_device *pdev)
|
|||
sprd_eic->chip.request = sprd_eic_request;
|
||||
sprd_eic->chip.free = sprd_eic_free;
|
||||
sprd_eic->chip.set_config = sprd_eic_set_config;
|
||||
sprd_eic->chip.set = sprd_eic_set;
|
||||
sprd_eic->chip.set_rv = sprd_eic_set;
|
||||
fallthrough;
|
||||
case SPRD_EIC_ASYNC:
|
||||
case SPRD_EIC_SYNC:
|
||||
|
|
|
|||
Loading…
Reference in a new issue