| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | [PATCH] bcm47xx : fix gpio_direction_output |
| From: | matthieu castet <castet.matthieu@free.fr> |
| Date: | Sun, 24 May 2009 19:48:51 +0200 |
| Cc: | Aurelien Jarno <aurelien@aurel32.net>, linux-mips@linux-mips.org |
| In-reply-to: | <20090521094054.GB22500@hall.aurel32.net> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <4A0EBC77.2010806@free.fr> <20090521094054.GB22500@hall.aurel32.net> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081204 Iceape/1.1.14 (Debian-1.1.14-1) |
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>
Index: linux-2.6/arch/mips/include/asm/mach-bcm47xx/gpio.h
===================================================================
--- linux-2.6.orig/arch/mips/include/asm/mach-bcm47xx/gpio.h 2009-05-24
19:43:55.000000000 +0200
+++ linux-2.6/arch/mips/include/asm/mach-bcm47xx/gpio.h 2009-05-24
19:44:56.000000000 +0200
@@ -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;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [loongson-PATCH-v1 22/27] Hibernation Support in mips system, Wu Zhangjin |
|---|---|
| Next by Date: | Re: [PATCH 25/30] loongson: Hibernation Support in mips system, Pavel Machek |
| Previous by Thread: | Re: [PATCH] fix gpio_direction_output for bcm47xx, Aurelien Jarno |
| Next by Thread: | [PATCH] -mr10k-cache-barrier=store, peter fuerst |
| Indexes: | [Date] [Thread] [Top] [All Lists] |