aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/gpio.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lg@denx.de>2009-02-12 08:27:22 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:19 -0400
commit999981d943e626bff5d031de1bf06435afb10ced (patch)
tree1adfed0fa77e28214262fa987ec9be2cfe46b7c1 /arch/arm/plat-mxc/gpio.c
parent6bbdbf2f95771c0a2dbccc423b99b37fde9a5078 (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>
Diffstat (limited to 'arch/arm/plat-mxc/gpio.c')
-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)
200static int mxc_gpio_direction_output(struct gpio_chip *chip, 200static int mxc_gpio_direction_output(struct gpio_chip *chip,
201 unsigned offset, int value) 201 unsigned offset, int value)
202{ 202{
203 _set_gpio_direction(chip, offset, 1);
204 mxc_gpio_set(chip, offset, value); 203 mxc_gpio_set(chip, offset, value);
204 _set_gpio_direction(chip, offset, 1);
205 return 0; 205 return 0;
206} 206}
207 207