Skip to content

Commit 83d92ea

Browse files
Bartosz Golaszewskiarndb
authored andcommitted
pinctrl: rp1: 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. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrea della Porta <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent aee4eee commit 83d92ea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/pinctrl/pinctrl-rp1.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,12 +779,14 @@ static int rp1_gpio_get(struct gpio_chip *chip, unsigned int offset)
779779
return ret;
780780
}
781781

782-
static void rp1_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
782+
static int rp1_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
783783
{
784784
struct rp1_pin_info *pin = rp1_get_pin(chip, offset);
785785

786786
if (pin)
787787
rp1_set_value(pin, value);
788+
789+
return 0;
788790
}
789791

790792
static int rp1_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
@@ -849,7 +851,7 @@ static const struct gpio_chip rp1_gpio_chip = {
849851
.direction_output = rp1_gpio_direction_output,
850852
.get_direction = rp1_gpio_get_direction,
851853
.get = rp1_gpio_get,
852-
.set = rp1_gpio_set,
854+
.set_rv = rp1_gpio_set,
853855
.base = -1,
854856
.set_config = rp1_gpio_set_config,
855857
.ngpio = RP1_NUM_GPIOS,

0 commit comments

Comments
 (0)