Skip to content

Commit e52254e

Browse files
Bartosz GolaszewskiLinus Walleij
authored andcommitted
pinctrl: pistachio: 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/20250424-gpiochip-set-rv-pinctrl-part2-v1-11-504f91120b99@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 8152769 commit e52254e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/pinctrl/pinctrl-pistachio.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,12 +1186,14 @@ static int pistachio_gpio_get(struct gpio_chip *chip, unsigned offset)
11861186
return !!(gpio_readl(bank, reg) & BIT(offset));
11871187
}
11881188

1189-
static void pistachio_gpio_set(struct gpio_chip *chip, unsigned offset,
1190-
int value)
1189+
static int pistachio_gpio_set(struct gpio_chip *chip, unsigned int offset,
1190+
int value)
11911191
{
11921192
struct pistachio_gpio_bank *bank = gpiochip_get_data(chip);
11931193

11941194
gpio_mask_writel(bank, GPIO_OUTPUT, offset, !!value);
1195+
1196+
return 0;
11951197
}
11961198

11971199
static int pistachio_gpio_direction_input(struct gpio_chip *chip,
@@ -1326,7 +1328,7 @@ static void pistachio_gpio_irq_handler(struct irq_desc *desc)
13261328
.direction_input = pistachio_gpio_direction_input, \
13271329
.direction_output = pistachio_gpio_direction_output, \
13281330
.get = pistachio_gpio_get, \
1329-
.set = pistachio_gpio_set, \
1331+
.set_rv = pistachio_gpio_set, \
13301332
.base = _pin_base, \
13311333
.ngpio = _npins, \
13321334
}, \

0 commit comments

Comments
 (0)