提交 f203b7ca 编写于 作者: M Matthieu Castet 提交者: Ralf Baechle

MIPS: BCM47xx: Fix gpio_direction_output

gpio_direction_output should also set an output value according to the API.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> 
Acked-by: NAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 cc906f8e
...@@ -37,6 +37,9 @@ static inline int gpio_direction_input(unsigned gpio) ...@@ -37,6 +37,9 @@ static inline int gpio_direction_input(unsigned gpio)
static inline int gpio_direction_output(unsigned gpio, int value) static inline int gpio_direction_output(unsigned gpio, int value)
{ {
/* first set the gpio out value */
ssb_gpio_out(&ssb_bcm47xx, 1 << gpio, value ? 1 << gpio : 0);
/* then set the gpio mode */
ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio); ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册