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

Configure Feed

Select the types of activity you want to include in your feed.

Input: adp5588 - 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.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20250610-gpiochip-set-rv-input-v1-2-5875240b48d8@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Bartosz Golaszewski and committed by
Dmitry Torokhov
687f0d0e 4aaadf94

+5 -4
+5 -4
drivers/input/keyboard/adp5588-keys.c
··· 232 232 return !!(val & bit); 233 233 } 234 234 235 - static void adp5588_gpio_set_value(struct gpio_chip *chip, 236 - unsigned int off, int val) 235 + static int adp5588_gpio_set_value(struct gpio_chip *chip, unsigned int off, 236 + int val) 237 237 { 238 238 struct adp5588_kpad *kpad = gpiochip_get_data(chip); 239 239 unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); ··· 246 246 else 247 247 kpad->dat_out[bank] &= ~bit; 248 248 249 - adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, kpad->dat_out[bank]); 249 + return adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, 250 + kpad->dat_out[bank]); 250 251 } 251 252 252 253 static int adp5588_gpio_set_config(struct gpio_chip *chip, unsigned int off, ··· 425 424 kpad->gc.direction_input = adp5588_gpio_direction_input; 426 425 kpad->gc.direction_output = adp5588_gpio_direction_output; 427 426 kpad->gc.get = adp5588_gpio_get_value; 428 - kpad->gc.set = adp5588_gpio_set_value; 427 + kpad->gc.set_rv = adp5588_gpio_set_value; 429 428 kpad->gc.set_config = adp5588_gpio_set_config; 430 429 kpad->gc.can_sleep = 1; 431 430