Skip to content

Commit

Permalink
mxc: first set GPIO level, then switch direction to output
Browse files Browse the repository at this point in the history
Make sure not to create spurious pulses on GPIOs, when configuring them as
output: first set required level, then switch direction.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Guennadi Liakhovetski authored and Sascha Hauer committed Mar 13, 2009
1 parent 6bbdbf2 commit 999981d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-mxc/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 999981d

Please sign in to comment.