提交 999981d9 编写于 作者: G Guennadi Liakhovetski 提交者: Sascha Hauer

mxc: first set GPIO level, then switch direction to output

Make sure not to create spurious pulses on GPIOs, when configuring them as
output: first set required level, then switch direction.
Signed-off-by: NGuennadi Liakhovetski <lg@denx.de>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 6bbdbf2f
......@@ -200,8 +200,8 @@ static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
static int mxc_gpio_direction_output(struct gpio_chip *chip,
unsigned offset, int value)
{
_set_gpio_direction(chip, offset, 1);
mxc_gpio_set(chip, offset, value);
_set_gpio_direction(chip, offset, 1);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册