From: Guennadi Liakhovetski Date: Thu, 12 Feb 2009 13:27:22 +0000 (+0100) Subject: mxc: first set GPIO level, then switch direction to output X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=999981d943e626bff5d031de1bf06435afb10ced;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Sascha Hauer --- 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; }