Skip to content

Commit

Permalink
pinctrl: ocelot: fix gpio direction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
alexandrebelloni authored and linusw committed Mar 26, 2018
1 parent e6c462d commit 44edff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-ocelot.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev,
struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);

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

return 0;
}
Expand Down

0 comments on commit 44edff1

Please sign in to comment.