diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2009-02-12 13:27:22 (GMT) |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-13 09:34:19 (GMT) |
commit | 999981d943e626bff5d031de1bf06435afb10ced (patch) | |
tree | 1adfed0fa77e28214262fa987ec9be2cfe46b7c1 /arch/arm | |
parent | 6bbdbf2f95771c0a2dbccc423b99b37fde9a5078 (diff) | |
download | linux-fsl-qoriq-999981d943e626bff5d031de1bf06435afb10ced.tar.xz |
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')
-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 ccbd94a..c6483ba 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; } |