From: matthieu castet <castet.matthieu@free.fr>
To: linux-mips@linux-mips.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: [PATCH] fix gpio_direction_output for bcm47xx
Date: Sat, 16 May 2009 15:15:35 +0200 [thread overview]
Message-ID: <4A0EBC77.2010806@free.fr> (raw)
[-- 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;
}
next reply other threads:[~2009-05-16 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-16 13:15 matthieu castet [this message]
2009-05-21 9:40 ` [PATCH] fix gpio_direction_output for bcm47xx Aurelien Jarno
2009-05-24 17:48 ` [PATCH] bcm47xx : fix gpio_direction_output matthieu castet
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=4A0EBC77.2010806@free.fr \
--to=castet.matthieu@free.fr \
--cc=aurelien@aurel32.net \
--cc=linux-mips@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).