summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lg@denx.de>2009-02-12 14:27:22 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 10:34:19 +0100
commit999981d943e626bff5d031de1bf06435afb10ced (patch)
tree1adfed0fa77e28214262fa987ec9be2cfe46b7c1
parentarm/imx: Kconfig beautification (diff)
downloadlinux-999981d943e626bff5d031de1bf06435afb10ced.tar.xz
linux-999981d943e626bff5d031de1bf06435afb10ced.zip
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
index ccbd94adc668..c6483bad8a26 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;
}