diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-04-07 09:24:14 +0200 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2025-05-23 08:48:12 +0100 |
| commit | 651974212cacef4ad24c4f97d52b6761f2219e96 (patch) | |
| tree | c9a2e6f589c42f476c751cacaee388d9fee9af61 /drivers/mfd | |
| parent | 3745b5ca35298885035fd5e3a133be7292cbe2fc (diff) | |
| download | linux-next-651974212cacef4ad24c4f97d52b6761f2219e96.tar.gz linux-next-651974212cacef4ad24c4f97d52b6761f2219e96.zip | |
mfd: tps65010: 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>
Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-mfd-v1-2-43f4d86d01d1@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
| -rw-r--r-- | drivers/mfd/tps65010.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index e7c57431c0cc..03bd5cd66798 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c @@ -446,7 +446,7 @@ static irqreturn_t tps65010_irq(int irq, void *_tps) * offsets 4..5 == LED1/nPG, LED2 (we set one of the non-BLINK modes) * offset 6 == vibrator motor driver */ -static void +static int tps65010_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { if (offset < 4) @@ -455,6 +455,8 @@ tps65010_gpio_set(struct gpio_chip *chip, unsigned offset, int value) tps65010_set_led(offset - 3, value ? ON : OFF); else tps65010_set_vib(value); + + return 0; } static int @@ -618,7 +620,7 @@ static int tps65010_probe(struct i2c_client *client) tps->chip.parent = &client->dev; tps->chip.owner = THIS_MODULE; - tps->chip.set = tps65010_gpio_set; + tps->chip.set_rv = tps65010_gpio_set; tps->chip.direction_output = tps65010_output; /* NOTE: only partial support for inputs; nyet IRQs */ |
