diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-04-07 09:13:17 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2025-04-17 13:58:54 +0200 |
commit | d170eef8d4b07f653fd5158f5b35b7bc0cbfbd07 (patch) | |
tree | 0fe8719446637844da1dcae859ce810c4e67a7ed | |
parent | 96af71338208bdb2c53de0876cf50001e20afc84 (diff) |
gpio: gw-pld: 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.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-8-78399683ca38@linaro.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
-rw-r--r-- | drivers/gpio/gpio-gw-pld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-gw-pld.c b/drivers/gpio/gpio-gw-pld.c index 7e29a2d8de1a..a40ba99a3aea 100644 --- a/drivers/gpio/gpio-gw-pld.c +++ b/drivers/gpio/gpio-gw-pld.c @@ -62,9 +62,9 @@ static int gw_pld_output8(struct gpio_chip *gc, unsigned offset, int value) return i2c_smbus_write_byte(gw->client, gw->out); } -static void gw_pld_set8(struct gpio_chip *gc, unsigned offset, int value) +static int gw_pld_set8(struct gpio_chip *gc, unsigned int offset, int value) { - gw_pld_output8(gc, offset, value); + return gw_pld_output8(gc, offset, value); } static int gw_pld_probe(struct i2c_client *client) @@ -86,7 +86,7 @@ static int gw_pld_probe(struct i2c_client *client) gw->chip.direction_input = gw_pld_input8; gw->chip.get = gw_pld_get8; gw->chip.direction_output = gw_pld_output8; - gw->chip.set = gw_pld_set8; + gw->chip.set_rv = gw_pld_set8; gw->client = client; /* |