mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
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>
This commit is contained in:
parent
cc906f8e23
commit
f203b7cacb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user