Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 999981d9 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Sascha Hauer
Browse files

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: default avatarGuennadi Liakhovetski <lg@denx.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 6bbdbf2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}