| To: | matthieu castet <castet.matthieu@free.fr> |
|---|---|
| Subject: | Re: [PATCH] fix gpio_direction_output for bcm47xx |
| From: | Aurelien Jarno <aurelien@aurel32.net> |
| Date: | Thu, 21 May 2009 11:40:54 +0200 |
| Cc: | linux-mips@linux-mips.org |
| In-reply-to: | <4A0EBC77.2010806@free.fr> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <4A0EBC77.2010806@free.fr> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [loongson-PATCH-v1 01/27] fix-warning: incompatible argument type of pci_fixup_irqs, Ralf Baechle |
|---|---|
| Next by Date: | Re: [PATCH] bc47xx : export ssb_watchdog_timer_set, matthieu castet |
| Previous by Thread: | [PATCH] fix gpio_direction_output for bcm47xx, matthieu castet |
| Next by Thread: | [PATCH] bcm47xx : fix gpio_direction_output, matthieu castet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |