From: Michael Lawnick <ml.lawnick@gmx.de>
To: Paul Carpenter <paul@pcserviceselectronics.co.uk>
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 10:00:44 +0100 [thread overview]
Message-ID: <5320223C.2090905@gmx.de> (raw)
In-Reply-To: <53201D46.9000306@pcserviceselectronics.co.uk>
Paul Carpenter schrieb:
> 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.
Nobody talked about change while SCL high. SCL is high and SDA low for
ACK. From slave's view it just keeps SDA low for first bit transmission
while SCL goes low and is expected to go high again.
I'm sure to have seen this multiple times.
You may just test on ordinary devices like lm75.
KR
Michael
WARNING: multiple messages have this Message-ID (diff)
From: Michael Lawnick <ml.lawnick@gmx.de>
To: Paul Carpenter <paul@pcserviceselectronics.co.uk>
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 09:00:44 +0000 [thread overview]
Message-ID: <5320223C.2090905@gmx.de> (raw)
In-Reply-To: <53201D46.9000306@pcserviceselectronics.co.uk>
Paul Carpenter schrieb:
> 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.
Nobody talked about change while SCL high. SCL is high and SDA low for
ACK. From slave's view it just keeps SDA low for first bit transmission
while SCL goes low and is expected to go high again.
I'm sure to have seen this multiple times.
You may just test on ordinary devices like lm75.
KR
Michael
next prev parent reply other threads:[~2014-03-12 9:00 UTC|newest]
Thread overview: 21+ 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:40 ` Wolfram Sang
2014-03-11 16:41 ` Ben Dooks
2014-03-11 16:47 ` Wolfram Sang
2014-03-11 16:47 ` Wolfram Sang
2014-03-11 17:10 ` Ben Dooks
2014-05-05 15:51 ` Wolfram Sang
2014-05-05 15:51 ` Wolfram Sang
2014-03-11 17:24 ` Wolfram Sang
2014-03-11 17:24 ` Wolfram Sang
2014-03-11 17:31 ` Ben Dooks
2014-03-11 17:46 ` Wolfram Sang
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:27 ` Michael Lawnick
2014-03-12 8:39 ` Paul Carpenter
2014-03-12 9:00 ` Michael Lawnick [this message]
2014-03-12 9:00 ` Michael Lawnick
[not found] ` <53201A83.7040605-Mmb7MZpHnFY@public.gmane.org>
2014-05-05 13:21 ` Wolfram Sang
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=5320223C.2090905@gmx.de \
--to=ml.lawnick@gmx.de \
--cc=ben.dooks@codethink.co.uk \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=paul@pcserviceselectronics.co.uk \
/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.