linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix gpio_direction_output for bcm47xx
@ 2009-05-16 13:15 matthieu castet
  2009-05-21  9:40 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: matthieu castet @ 2009-05-16 13:15 UTC (permalink / raw)
  To: linux-mips; +Cc: Aurelien Jarno

[-- Attachment #1: Type: text/plain, Size: 128 bytes --]

gpio_direction_output should also set to a output value per gpio API.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>

[-- Attachment #2: fix_bcm47xx_gpio_out.diff --]
[-- Type: text/x-diff, Size: 570 bytes --]

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;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-24 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-16 13:15 [PATCH] fix gpio_direction_output for bcm47xx matthieu castet
2009-05-21  9:40 ` Aurelien Jarno
2009-05-24 17:48   ` [PATCH] bcm47xx : fix gpio_direction_output matthieu castet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).