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

bcma: 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20250407-gpiochip-set-rv-bcma-v1-1-fa403ad76966@linaro.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Bartosz Golaszewski and committed by
Johannes Berg
1237c563 48763769

+5 -3
+5 -3
drivers/bcma/driver_gpio.c
··· 26 26 return !!bcma_chipco_gpio_in(cc, 1 << gpio); 27 27 } 28 28 29 - static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio, 30 - int value) 29 + static int bcma_gpio_set_value(struct gpio_chip *chip, unsigned int gpio, 30 + int value) 31 31 { 32 32 struct bcma_drv_cc *cc = gpiochip_get_data(chip); 33 33 34 34 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); 35 + 36 + return 0; 35 37 } 36 38 37 39 static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) ··· 186 184 chip->request = bcma_gpio_request; 187 185 chip->free = bcma_gpio_free; 188 186 chip->get = bcma_gpio_get_value; 189 - chip->set = bcma_gpio_set_value; 187 + chip->set_rv = bcma_gpio_set_value; 190 188 chip->direction_input = bcma_gpio_direction_input; 191 189 chip->direction_output = bcma_gpio_direction_output; 192 190 chip->parent = bus->dev;