gpio: aspeed: Set output latch before changing direction
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 17 May 2018 08:11:56 +0000 (18:11 +1000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 23 May 2018 11:57:44 +0000 (13:57 +0200)
commitaf7949284910a1f0b7814625051b8acf99af74d2
treebc66de732f8d6e68175748a99e2156b5c0ad145b
parentd5dbf9c266ccf632cdf259146e4ec62b381db655
gpio: aspeed: Set output latch before changing direction

In aspeed_gpio_dir_out(), we need to establish the new output
value in the output latch *before* we change the direction
to output in order to avoid a glitch on the output line if
the previous value of the latch was different.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-aspeed.c