* [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
* Re: [PATCH] fix gpio_direction_output for bcm47xx
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
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2009-05-21 9:40 UTC (permalink / raw)
To: matthieu castet; +Cc: linux-mips
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@free.fr>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
> 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@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] bcm47xx : fix gpio_direction_output
2009-05-21 9:40 ` Aurelien Jarno
@ 2009-05-24 17:48 ` matthieu castet
0 siblings, 0 replies; 3+ messages in thread
From: matthieu castet @ 2009-05-24 17:48 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Aurelien Jarno, linux-mips
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: fix_bcm47xx_gpio_out.diff --]
[-- Type: text/x-diff, Size: 790 bytes --]
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;
}
^ permalink raw reply [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).