linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>, linux-mips@linux-mips.org
Subject: [PATCH] bcm47xx : fix gpio_direction_output
Date: Sun, 24 May 2009 19:48:51 +0200	[thread overview]
Message-ID: <4A198883.3070801@free.fr> (raw)
In-Reply-To: <20090521094054.GB22500@hall.aurel32.net>

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

      reply	other threads:[~2009-05-24 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` matthieu castet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A198883.3070801@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=aurelien@aurel32.net \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).