diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-04-07 09:10:49 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2025-04-23 15:28:24 +0200 |
| commit | 1237c5632fe34244ff7d726d4bc96b3048c10562 (patch) | |
| tree | b6e76b0c778e93a8efc8b1c6a075ac02b9ff9ba1 /drivers/bcma | |
| parent | 4876376988081d636a4c4e5f03a5556386b49087 (diff) | |
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>
Diffstat (limited to 'drivers/bcma')
| -rw-r--r-- | drivers/bcma/driver_gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c index 5f90bac6bb09..f021e27644e0 100644 --- a/drivers/bcma/driver_gpio.c +++ b/drivers/bcma/driver_gpio.c @@ -26,12 +26,14 @@ static int bcma_gpio_get_value(struct gpio_chip *chip, unsigned gpio) return !!bcma_chipco_gpio_in(cc, 1 << gpio); } -static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio, - int value) +static int bcma_gpio_set_value(struct gpio_chip *chip, unsigned int gpio, + int value) { struct bcma_drv_cc *cc = gpiochip_get_data(chip); bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); + + return 0; } static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) @@ -184,7 +186,7 @@ int bcma_gpio_init(struct bcma_drv_cc *cc) chip->request = bcma_gpio_request; chip->free = bcma_gpio_free; chip->get = bcma_gpio_get_value; - chip->set = bcma_gpio_set_value; + chip->set_rv = bcma_gpio_set_value; chip->direction_input = bcma_gpio_direction_input; chip->direction_output = bcma_gpio_direction_output; chip->parent = bus->dev; |