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

gpio: amd-fch: 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-10-1d5cceeebf8b@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+4 -3
+4 -3
drivers/gpio/gpio-amd-fch.c
··· 95 95 return ret ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN; 96 96 } 97 97 98 - static void amd_fch_gpio_set(struct gpio_chip *gc, 99 - unsigned int gpio, int value) 98 + static int amd_fch_gpio_set(struct gpio_chip *gc, unsigned int gpio, int value) 100 99 { 101 100 unsigned long flags; 102 101 struct amd_fch_gpio_priv *priv = gpiochip_get_data(gc); ··· 112 113 writel_relaxed(mask, ptr); 113 114 114 115 spin_unlock_irqrestore(&priv->lock, flags); 116 + 117 + return 0; 115 118 } 116 119 117 120 static int amd_fch_gpio_get(struct gpio_chip *gc, ··· 165 164 priv->gc.direction_output = amd_fch_gpio_direction_output; 166 165 priv->gc.get_direction = amd_fch_gpio_get_direction; 167 166 priv->gc.get = amd_fch_gpio_get; 168 - priv->gc.set = amd_fch_gpio_set; 167 + priv->gc.set_rv = amd_fch_gpio_set; 169 168 170 169 spin_lock_init(&priv->lock); 171 170