Skip to content

Commit 44edff1

Browse files
alexandrebellonilinusw
authored andcommitted
pinctrl: ocelot: fix gpio direction
Bits have to be cleared in DEVCPU_GCB:GPIO:GPIO_OE for input and set for output. ocelot_gpio_set_direction() got it wrong and this went unnoticed when the driver was reworked. Reported-by: Gregory Clement <gregory.clement@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent e6c462d commit 44edff1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pinctrl/pinctrl-ocelot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev,
252252
struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
253253

254254
regmap_update_bits(info->map, OCELOT_GPIO_OE, BIT(pin),
255-
input ? BIT(pin) : 0);
255+
input ? 0 : BIT(pin));
256256

257257
return 0;
258258
}

0 commit comments

Comments
 (0)