diff options
author | Matthieu Castet <castet.matthieu@free.fr> | 2009-05-24 19:48:51 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-17 11:06:28 +0100 |
commit | f203b7cacb96e4bb44b6995c03152cbedfb1857f (patch) | |
tree | d1ff4da5baa4828b2334fb2d671001b5f4a3d71d /arch/mips | |
parent | cc906f8e237770cf22d132dfa27ea586d67f7bf2 (diff) | |
download | linux-stable-f203b7cacb96e4bb44b6995c03152cbedfb1857f.tar.gz linux-stable-f203b7cacb96e4bb44b6995c03152cbedfb1857f.tar.bz2 linux-stable-f203b7cacb96e4bb44b6995c03152cbedfb1857f.zip |
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: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/mach-bcm47xx/gpio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-bcm47xx/gpio.h b/arch/mips/include/asm/mach-bcm47xx/gpio.h index 1784fde2e28f..98504142124e 100644 --- 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; } |