Explorar o código

bcm47xx: Fix GPIO data direction output bit assignment

SVN-Revision: 10605
Michael Büsch %!s(int64=18) %!d(string=hai) anos
pai
achega
d3cf33a4ae

+ 2 - 1
target/linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h

@@ -22,7 +22,8 @@ static inline int gpio_direction_input(unsigned gpio)
 
 static inline int gpio_direction_output(unsigned gpio, int value)
 {
-	ssb_gpio_outen(&ssb, 1 << gpio, value << gpio);
+	ssb_gpio_out(&ssb, 1 << gpio, (value ? 1 << gpio : 0));
+	ssb_gpio_outen(&ssb, 1 << gpio, 1 << gpio);
 	return 0;
 }