Setting the direction and an output value should be done by
1) set the desired output value,
2) switch to output.
If this is done in the inverse order, there can be a glitch on
the GPIO line.
This patch fixes this by using the order as described above.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Stefano Babic <sbabic@denx.de>
struct mxs_register_32 *reg =
(struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset);
- writel(1 << PAD_PIN(gpio), ®->reg_set);
-
gpio_set_value(gpio, value);
+ writel(1 << PAD_PIN(gpio), ®->reg_set);
+
return 0;
}