From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: florian.vaussard@epfl.ch
Cc: linux-omap <linux-omap@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
"Philippe Rétornaz" <philippe.retornaz@epfl.ch>
Subject: Re: TWL6040 fails to initialize
Date: Wed, 26 Feb 2014 09:26:39 +0200 [thread overview]
Message-ID: <530D972F.805@ti.com> (raw)
In-Reply-To: <530CB9C6.60806@epfl.ch>
On 02/25/2014 05:41 PM, Florian Vaussard wrote:
> If the power was not enabled at all, I would be unable to read the
> revision register, no? And delaying the probe by one millisecond would
> be of no help in this case IMHO.
One thing which might cause this is that if the audpwron GPIO is set high
before the twl6040 module is probing. When I request the GPIO I ask it to be
set to low. If the line was high before this means we initiate the power off
sequence.
Can you try something like this:
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index 75316fb33448..d2a0bd1539ae 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -674,6 +674,9 @@ static int twl6040_probe(struct i2c_client *client,
GPIOF_OUT_INIT_LOW, "audpwron");
if (ret)
goto gpio_err;
+
+ /* power-down sequence latency */
+ usleep_range(500, 700);
}
ret = regmap_add_irq_chip(twl6040->regmap, twl6040->irq, IRQF_ONESHOT,
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: TWL6040 fails to initialize
Date: Wed, 26 Feb 2014 09:26:39 +0200 [thread overview]
Message-ID: <530D972F.805@ti.com> (raw)
In-Reply-To: <530CB9C6.60806@epfl.ch>
On 02/25/2014 05:41 PM, Florian Vaussard wrote:
> If the power was not enabled at all, I would be unable to read the
> revision register, no? And delaying the probe by one millisecond would
> be of no help in this case IMHO.
One thing which might cause this is that if the audpwron GPIO is set high
before the twl6040 module is probing. When I request the GPIO I ask it to be
set to low. If the line was high before this means we initiate the power off
sequence.
Can you try something like this:
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index 75316fb33448..d2a0bd1539ae 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -674,6 +674,9 @@ static int twl6040_probe(struct i2c_client *client,
GPIOF_OUT_INIT_LOW, "audpwron");
if (ret)
goto gpio_err;
+
+ /* power-down sequence latency */
+ usleep_range(500, 700);
}
ret = regmap_add_irq_chip(twl6040->regmap, twl6040->irq, IRQF_ONESHOT,
--
P?ter
next prev parent reply other threads:[~2014-02-26 7:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 10:30 TWL6040 fails to initialize Florian Vaussard
2014-02-25 10:30 ` Florian Vaussard
2014-02-25 14:29 ` Peter Ujfalusi
2014-02-25 14:29 ` Peter Ujfalusi
2014-02-25 15:41 ` Florian Vaussard
2014-02-25 15:41 ` Florian Vaussard
2014-02-26 7:26 ` Peter Ujfalusi [this message]
2014-02-26 7:26 ` Peter Ujfalusi
2014-02-26 9:53 ` Florian Vaussard
2014-02-26 9:53 ` Florian Vaussard
2014-02-26 10:28 ` Peter Ujfalusi
2014-02-26 10:28 ` Peter Ujfalusi
2014-02-26 10:31 ` Florian Vaussard
2014-02-26 10:31 ` Florian Vaussard
2014-02-27 12:05 ` Peter Ujfalusi
2014-02-27 12:05 ` Peter Ujfalusi
2014-02-27 15:24 ` Florian Vaussard
2014-02-27 15:24 ` Florian Vaussard
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=530D972F.805@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=florian.vaussard@epfl.ch \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=philippe.retornaz@epfl.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.