On Sat, May 16, 2009 at 03:15:35PM +0200, matthieu castet wrote: > gpio_direction_output should also set to a output value per gpio API. > > Signed-off-by: Matthieu CASTET <castet.matthieu@xxxxxxx> Acked-by: Aurelien Jarno <aurelien@xxxxxxxxxxx> > diff --git a/arch/mips/include/asm/mach-bcm47xx/gpio.h b/arch/mips/include/asm/mach-bcm47xx/gpio.h > index 1784fde..9850414 100644 > --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h > +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h > @@ -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; > } -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@xxxxxxxxxxx http://www.aurel32.net