projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc906f8
)
MIPS: BCM47xx: Fix gpio_direction_output
author
Matthieu Castet
<
[email protected]
>
Sun, 24 May 2009 17:48:51 +0000
(19:48 +0200)
committer
Ralf Baechle
<
[email protected]
>
Wed, 17 Jun 2009 10:06:28 +0000
(11:06 +0100)
gpio_direction_output should also set an output value according to the API.
Signed-off-by: Matthieu CASTET <
[email protected]
>
Acked-by: Aurelien Jarno <
[email protected]
>
Signed-off-by: Ralf Baechle <
[email protected]
>
arch/mips/include/asm/mach-bcm47xx/gpio.h
patch
|
blob
|
history
diff --git
a/arch/mips/include/asm/mach-bcm47xx/gpio.h
b/arch/mips/include/asm/mach-bcm47xx/gpio.h
index 1784fde2e28fc3ae4f69d338863c907148c56ba1..98504142124ec97ed571b2c36696c87d3c91e6ac 100644
(file)
--- a/
arch/mips/include/asm/mach-bcm47xx/gpio.h
+++ b/
arch/mips/include/asm/mach-bcm47xx/gpio.h
@@
-37,6
+37,9
@@
static inline int gpio_direction_input(unsigned gpio)
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);
return 0;
}