public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-omap@vger.kernel.org
Subject: Re: [patch 2.6.27-rc7-omap1-git 1/2] twl4030-core: move to drivers/mfd
Date: Thu, 2 Oct 2008 12:47:11 -0700	[thread overview]
Message-ID: <200810021247.11953.david-b@pacbell.net> (raw)
In-Reply-To: <200810011947.55057.david-b@pacbell.net>

On Wednesday 01 October 2008, David Brownell wrote:
> NOTE: minor weirdness.  The twl403-pwrirq initializes earlier (?)
> than before ... but "i2c_omap i2c_omap.1: controller timed out"

I'm seeing a bunch of these ... not clear why.  Usually while
booting ... but regardless, lack of fault recovery makes for
lots of trouble.


> is the response to its first I2C request.  So it bails, causing
> twl4030_usb and then rtc_twl4030 request_irq() calls to fail, and
> those drivers probe() calls fail.
> 
> But, for the first time in a long while, the USB host now enumerates
> my Ethernet adapter!!  So it's a net win in terms of overall behavior,
> since I can now get the time from NTP (loss of RTC doesn't hurt).
> 
> Make the pwrirq code retry that first write (setting the mask to
> the value the core already set it) ... and pwrirq comes up, RTC,
> the transceiver glue.  And USB can't enumerate that adapter. :(

My retry hack is appended.  If anyone has an idea what's up with
the I2C driver, it'd be good to fix ... although I'm happy to see
what fault handling bugs these errors turn up.

More info on the USB thing:  the issue is that if the external
hub is connected when MUSB comes up, it misbehaves.  If it's
plugged in later, it works.  The misbehavior may involve not
seeing the external hub; or it may instead be errors in some
operations talking to a devices hooked up to it.

- Dave


Usually a single retry lets this chip behave.
---
 drivers/i2c/chips/twl4030-pwrirq.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/drivers/i2c/chips/twl4030-pwrirq.c
+++ b/drivers/i2c/chips/twl4030-pwrirq.c
@@ -161,6 +161,8 @@ static int twl4030_pwrirq_thread(void *d
 	return 0;
 }
 
+#include <linux/delay.h>
+
 static int __init twl4030_pwrirq_init(void)
 {
 	int i, err;
@@ -168,8 +170,16 @@ static int __init twl4030_pwrirq_init(vo
 	twl4030_pwrirq_mask = 0xff;
 	twl4030_pwrirq_pending_unmask = 0;
 
+/* HEY:  core already did this.
+ * But that's surely not why we
+ * sometimes see timeouts here ...
+ */
+for (i = 0; i < 5; i++) {
 	err = twl4030_i2c_write_u8(TWL4030_MODULE_INT, twl4030_pwrirq_mask,
 					TWL4030_INT_PWR_IMR1);
+if (!err) break;
+msleep(10);
+}
 	if (err)
 		return err;
 

--
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

      parent reply	other threads:[~2008-10-02 20:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02  2:47 [patch 2.6.27-rc7-omap1-git 1/2] twl4030-core: move to drivers/mfd David Brownell
2008-10-02  9:07 ` Felipe Balbi
2008-10-02 14:52   ` David Brownell
2008-10-02 14:53     ` Felipe Balbi
2008-10-03 13:37       ` Tony Lindgren
2008-10-03 20:12         ` Nathan Monson
2008-10-03 22:16           ` David Brownell
2008-10-03 23:31             ` Nathan Monson
2008-10-04  0:00               ` David Brownell
2008-10-02 19:47 ` David Brownell [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=200810021247.11953.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.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