mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
gpio: xlp: use new GPIO 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/20250709-gpiochip-set-rv-gpio-remaining-v1-12-b8950f69618d@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
c719fd3e39
commit
6d0f71cd58
1 changed files with 4 additions and 2 deletions
|
@ -227,11 +227,13 @@ static int xlp_gpio_get(struct gpio_chip *gc, unsigned gpio)
|
|||
return xlp_gpio_get_reg(priv->gpio_paddrv, gpio);
|
||||
}
|
||||
|
||||
static void xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state)
|
||||
static int xlp_gpio_set(struct gpio_chip *gc, unsigned int gpio, int state)
|
||||
{
|
||||
struct xlp_gpio_priv *priv = gpiochip_get_data(gc);
|
||||
|
||||
xlp_gpio_set_reg(priv->gpio_paddrv, gpio, state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xlp_gpio_probe(struct platform_device *pdev)
|
||||
|
@ -272,7 +274,7 @@ static int xlp_gpio_probe(struct platform_device *pdev)
|
|||
gc->ngpio = 70;
|
||||
gc->direction_output = xlp_gpio_dir_output;
|
||||
gc->direction_input = xlp_gpio_dir_input;
|
||||
gc->set = xlp_gpio_set;
|
||||
gc->set_rv = xlp_gpio_set;
|
||||
gc->get = xlp_gpio_get;
|
||||
|
||||
spin_lock_init(&priv->lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue