fix gpio_direction_output for bcm47xx
Subsystems (2)
PATCH 1/1 fix gpio_direction_output for bcm47xx
gpio_direction_output should also set to a output value per gpio API.
Signed-off-by Matthieu CASTET <[email protected]>
arch/mips/include/asm/mach-bcm47xx/gpio.h +3 -0
@@ -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 ; }
Quoted 3 lines · matthieu castet
gpio_direction_outputshould also set to a output value per gpio API.Signed-off-by Matthieu CASTET <[email protected]>
Acked-by Aurelien Jarno <[email protected]>
Quoted 14 lines
arch/mips/include/asm/mach-bcm47xx/gpio.h +3
-0@@ -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 ; }
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH 1/1 bcm47xx : fix gpio_direction_output
gpio_direction_output should also set an output value according to the API.
Signed-off-by Matthieu CASTET <[email protected]>
Acked-by Aurelien Jarno <[email protected]>
arch/mips/include/asm/mach-bcm47xx/gpio.h +3 -0
@@ -37,6 +37,9 @@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 ; }