提交 44edff1b 编写于 作者: A Alexandre Belloni 提交者: Linus Walleij

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: NGregory Clement <gregory.clement@bootlin.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: NGregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 e6c462d3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册