Skip to content

Commit 55ba537

Browse files
Bartosz Golaszewskitsbogend
authored andcommitted
MIPS: rb532: gpio: 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> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 0af2f6b commit 55ba537

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arch/mips/rb532/gpio.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
105105
/*
106106
* Set output GPIO level
107107
*/
108-
static void rb532_gpio_set(struct gpio_chip *chip,
109-
unsigned offset, int value)
108+
static int rb532_gpio_set(struct gpio_chip *chip, unsigned int offset,
109+
int value)
110110
{
111111
struct rb532_gpio_chip *gpch;
112112

113113
gpch = gpiochip_get_data(chip);
114114
rb532_set_bit(value, offset, gpch->regbase + GPIOD);
115+
116+
return 0;
115117
}
116118

117119
/*
@@ -162,7 +164,7 @@ static struct rb532_gpio_chip rb532_gpio_chip[] = {
162164
.direction_input = rb532_gpio_direction_input,
163165
.direction_output = rb532_gpio_direction_output,
164166
.get = rb532_gpio_get,
165-
.set = rb532_gpio_set,
167+
.set_rv = rb532_gpio_set,
166168
.to_irq = rb532_gpio_to_irq,
167169
.base = 0,
168170
.ngpio = 32,

0 commit comments

Comments
 (0)