linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Carpenter <paul@pcserviceselectronics.co.uk>
To: Michael Lawnick <ml.lawnick@gmx.de>
Cc: Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-i2c@vger.kernel.org, SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: rcar-i2c: always reads a byte
Date: Wed, 12 Mar 2014 08:39:34 +0000	[thread overview]
Message-ID: <53201D46.9000306@pcserviceselectronics.co.uk> (raw)
In-Reply-To: <53201A83.7040605@gmx.de>

Michael Lawnick wrote:
 > Hi,
 >
 > Ben Dooks schrieb:
 >> I have noticed the following behaviour with the i2c-rcar driver
 >> with the following single i2c_msg structure:
 >>
 >>     msg[0].addr = 0x12;
 >>     msg[0].flags = I2C_M_RD;
 >>     msg[0].len = 0;
 >>     msg[0].buf = data;
 >
 > isn't this illegal?
 > This should lead to 50% chance of blocked bus: After sending read-bit
 > the slave ACK's and puts first data bit onto SDL. If it is '0',

NO device should change the data line during SCL rising or SCL HIGH
this would cause STOP/START confusion.

The data line should be driven at detection of SCL falling (or just
after normally.

 > master
 > won't be able to signal stop nor arbitrate the bus for other transaction
 > until slave runs into internal timeout (*if* supported).

Master can signal STOP during SCL HIGH as normal.

 > Only 9 SCL toggles will be able to free bus again.

If there is not a short or other fault on SCL being held low, drive as
much as you like wont make any difference.

 > But maybe I'm missing something.

See above

 > KR
 > Michael

-- 
Paul Carpenter          | paul@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/>    PC Services
<http://www.pcserviceselectronics.co.uk/pi/>  Raspberry Pi Add-ons
<http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font

  reply	other threads:[~2014-03-12  8:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 16:15 rcar-i2c: always reads a byte Ben Dooks
2014-03-11 16:40 ` Wolfram Sang
2014-03-11 16:41   ` Ben Dooks
2014-03-11 16:47     ` Wolfram Sang
2014-03-11 17:10     ` Ben Dooks
2014-05-05 15:51       ` Wolfram Sang
2014-03-11 17:24   ` Wolfram Sang
2014-03-11 17:31     ` Ben Dooks
2014-03-11 17:46       ` Wolfram Sang
     [not found] ` <531F3686.7050808-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2014-03-12  8:27   ` Michael Lawnick
2014-03-12  8:39     ` Paul Carpenter [this message]
2014-03-12  9:00       ` Michael Lawnick
     [not found]     ` <53201A83.7040605-Mmb7MZpHnFY@public.gmane.org>
2014-05-05 13:21       ` 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=53201D46.9000306@pcserviceselectronics.co.uk \
    --to=paul@pcserviceselectronics.co.uk \
    --cc=ben.dooks@codethink.co.uk \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ml.lawnick@gmx.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;
as well as URLs for NNTP newsgroup(s).