Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f203b7ca authored by Matthieu CASTET's avatar Matthieu CASTET Committed by Ralf Baechle
Browse files

MIPS: BCM47xx: Fix gpio_direction_output



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

Signed-off-by: default avatarMatthieu CASTET <castet.matthieu@free.fr>
Acked-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent cc906f8e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
}