From: Felipe Balbi <balbi@ti.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Felipe Balbi <balbi@ti.com>, Tony Lindgren <tony@atomide.com>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: omap: implement bus recovery
Date: Wed, 6 May 2015 11:44:28 -0500 [thread overview]
Message-ID: <20150506164428.GC12279@saruman.tx.rr.com> (raw)
In-Reply-To: <20150410214122.GB15596@katana>
[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]
On Fri, Apr 10, 2015 at 11:41:22PM +0200, Wolfram Sang wrote:
> On Thu, Feb 19, 2015 at 12:06:49PM -0600, Felipe Balbi wrote:
> > If either SCL or SDA are stuck low, we need to
> > recover the bus using the procedure described
> > on section 3.1.16 of the I2C specification.
> >
> > Note that we're trying to implement the procedure
> > exactly as described by that section. First we
> > check which line is stuck low, then implement
> > one or the other procedure. If SDA recovery procedure
> > fails, we reset our IP in an attempt to make it work.
> >
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
>
> As Grygorii already mentioned: can you convert it to the standard i2c
> bus recovery mechanism?
>
> And is the timeout you replace with the recovery caused by SDA stuck
> high (check the thread starting with
> http://thread.gmane.org/gmane.linux.kernel/1841371/focus=22435)
SDA stuck low is one reason, yes. There could be other reasons like the
far end (i2c client) just crapping out. I know of one touchscreen
controller which will just die if you continuously try to read from
unexistent registers. It will NAK for a while and later just die,
completely. The only way to recover from that today is resetting the
board. I have a feeling that resetting the touch controller might be
doable if we have a reset pin tied to a GPIO, haven't tried that yet. In
any case this is off-topic.
I'll rebase the patch and fix what you asked, then retest, and resend.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-05-06 16:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 18:06 [PATCH] i2c: omap: implement bus recovery Felipe Balbi
[not found] ` <1424369209-26735-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-02-19 18:09 ` Felipe Balbi
2015-03-09 16:39 ` Felipe Balbi
[not found] ` <20150309163917.GI3739-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org>
2015-03-11 1:50 ` Felipe Balbi
2015-03-11 13:47 ` Grygorii Strashko
2015-03-11 15:22 ` Wolfram Sang
2015-04-10 21:41 ` Wolfram Sang
2015-05-06 16:44 ` Felipe Balbi [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-06 16:50 Felipe Balbi
2015-05-12 19:19 ` Wolfram Sang
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=20150506164428.GC12279@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=wsa@the-dreams.de \
/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