linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hein Tibosch <hein_tibosch-mRCrAkd8dF0@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	linux-i2c <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] i2c-omap: always send stop after nack
Date: Tue, 16 Jul 2013 17:33:47 +0800	[thread overview]
Message-ID: <51E5137B.7000302@yahoo.es> (raw)
In-Reply-To: <20130716090300.GG8880-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>

On 7/16/2013 5:03 PM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 16, 2013 at 04:19:35PM +0800, Hein Tibosch wrote:
>> Hi Vikram,
>>
>> On a OMAP4460, i2c-bus-3:
>>
>> A driver (lm75) is causing many 'timeout waiting for bus ready' errors.
>> SDA remains high (as it should), but SCL remains low after a NACK.
>> The bus becomes _unusable for other clients_.
>>
>> While probing, "lm75" writes a command, followed by a read + stop,
>> but the write command is NACK'd. The chip does accept other writes/reads,
>> it just refuses to ack invalid commands.
>>
>> Can you tell me if the patch below would make any sense? Or is it the
>> responsibility of the client to reset the i2c_smbus?
> patch below breaks repeated start.
Hi,

No, after the NACK, no more commands are being processed,
including a repeated start. omap_i2c_xfer() returns -EREMOTEIO
without ever freeing the bus.

The bus is left in an impossible state with SCL constantly low
and all next commands (to different chips) will therefore get
a -ETIMEDOUT

With this patch, the bus will become idle again and new commands
can be processed normally

Hein

  parent reply	other threads:[~2013-07-16  9:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16  8:19 [PATCH] i2c-omap: always send stop after nack Hein Tibosch
2013-07-16  9:03 ` Felipe Balbi
     [not found]   ` <20130716090300.GG8880-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-07-16  9:33     ` Hein Tibosch [this message]
2013-07-16  9:42       ` Felipe Balbi
     [not found]         ` <20130716094212.GL8880-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-07-16 11:01           ` Grygorii Strashko
2013-07-16 11:27             ` Felipe Balbi
2013-07-16 12:08               ` Grygorii Strashko
     [not found]                 ` <51E537A4.40300-l0cyMroinI0@public.gmane.org>
2013-07-16 13:00                   ` Felipe Balbi
2013-07-16 16:17                     ` Hein Tibosch
     [not found]                       ` <51E57211.2040001-mRCrAkd8dF0@public.gmane.org>
2013-08-19 12:11                         ` Wolfram Sang
2013-08-19 13:57                           ` Felipe Balbi
2013-08-19 14:05                             ` Wolfram Sang
2013-08-20 16:39                           ` Grygorii Strashko

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=51E5137B.7000302@yahoo.es \
    --to=hein_tibosch-mrcrakd8df0@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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).