Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Matthieu Castet and committed by
Ralf Baechle
f203b7ca cc906f8e

+3
+3
arch/mips/include/asm/mach-bcm47xx/gpio.h
··· 37 37 38 38 static inline int gpio_direction_output(unsigned gpio, int value) 39 39 { 40 + /* first set the gpio out value */ 41 + ssb_gpio_out(&ssb_bcm47xx, 1 << gpio, value ? 1 << gpio : 0); 42 + /* then set the gpio mode */ 40 43 ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio); 41 44 return 0; 42 45 }