From: rubini-list@gnudd.com (Alessandro Rubini)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] nhk8815: fix i2c-gpio initialization
Date: Thu, 17 Dec 2009 10:34:34 +0100 [thread overview]
Message-ID: <20091217093434.GA17336@morgana.gnudd.com> (raw)
From: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
---
arch/arm/mach-nomadik/i2c-8815nhk.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c
index abfe25a..7045ec1 100644
--- a/arch/arm/mach-nomadik/i2c-8815nhk.c
+++ b/arch/arm/mach-nomadik/i2c-8815nhk.c
@@ -43,12 +43,17 @@ static struct platform_device nhk8815_i2c_dev1 = {
static int __init nhk8815_i2c_init(void)
{
+ /* i2c-gpio switches from out to in and back, so force out data to 0 */
nmk_gpio_set_mode(nhk8815_i2c_data0.scl_pin, NMK_GPIO_ALT_GPIO);
nmk_gpio_set_mode(nhk8815_i2c_data0.sda_pin, NMK_GPIO_ALT_GPIO);
+ gpio_set_value(nhk8815_i2c_data0.sda_pin, 0);
+ gpio_set_value(nhk8815_i2c_data0.scl_pin, 0);
platform_device_register(&nhk8815_i2c_dev0);
nmk_gpio_set_mode(nhk8815_i2c_data1.scl_pin, NMK_GPIO_ALT_GPIO);
nmk_gpio_set_mode(nhk8815_i2c_data1.sda_pin, NMK_GPIO_ALT_GPIO);
+ gpio_set_value(nhk8815_i2c_data1.sda_pin, 0);
+ gpio_set_value(nhk8815_i2c_data1.scl_pin, 0);
platform_device_register(&nhk8815_i2c_dev1);
return 0;
--
1.6.0.2
reply other threads:[~2009-12-17 9:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20091217093434.GA17336@morgana.gnudd.com \
--to=rubini-list@gnudd.com \
--cc=linux-arm-kernel@lists.infradead.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).