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

gpio: bt8xx: 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/20250310-gpiochip-set-conversion-v1-8-03798bb833eb@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+4 -3
+4 -3
drivers/gpio/gpio-bt8xx.c
··· 119 119 return 0; 120 120 } 121 121 122 - static void bt8xxgpio_gpio_set(struct gpio_chip *gpio, 123 - unsigned nr, int val) 122 + static int bt8xxgpio_gpio_set(struct gpio_chip *gpio, unsigned int nr, int val) 124 123 { 125 124 struct bt8xxgpio *bg = gpiochip_get_data(gpio); 126 125 u32 data; ··· 132 133 else 133 134 data &= ~(1 << nr); 134 135 bgwrite(data, BT848_GPIO_DATA); 136 + 137 + return 0; 135 138 } 136 139 137 140 static void bt8xxgpio_gpio_setup(struct bt8xxgpio *bg) ··· 145 144 c->direction_input = bt8xxgpio_gpio_direction_input; 146 145 c->get = bt8xxgpio_gpio_get; 147 146 c->direction_output = bt8xxgpio_gpio_direction_output; 148 - c->set = bt8xxgpio_gpio_set; 147 + c->set_rv = bt8xxgpio_gpio_set; 149 148 c->dbg_show = NULL; 150 149 c->base = modparam_gpiobase; 151 150 c->ngpio = BT8XXGPIO_NR_GPIOS;