diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2009-02-12 14:27:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-13 10:34:19 +0100 |
commit | 999981d943e626bff5d031de1bf06435afb10ced (patch) | |
tree | 1adfed0fa77e28214262fa987ec9be2cfe46b7c1 | |
parent | 6bbdbf2f95771c0a2dbccc423b99b37fde9a5078 (diff) |
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: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/plat-mxc/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index ccbd94adc66..c6483bad8a2 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c @@ -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; } |