[Top] [All Lists]

Re: [PATCH 1/2] i2c-au1550: send i2c stop on error #2

To: Manuel Lauss <>
Subject: Re: [PATCH 1/2] i2c-au1550: send i2c stop on error #2
From: Jean Delvare <>
Date: Wed, 16 May 2007 20:20:01 +0200
Cc:,, Domen Puncer <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <20070516153822.176cbd68@hyperion.delvare> <>
On Wed, 16 May 2007 16:20:38 +0200, Manuel Lauss wrote:
> > 2* In i2c_write and i2c_read, the stop bit is always sent together with
> > the last byte, while your new code sends the stop bit on its own after
> > the address byte. Is it OK? 
> Well, no. However the quick probe does an i2c read IIRC so it should be
> safe. I'll fix that too.

From an I2C perspective, zero-byte transactions can be both reads and
writes. So if you accidentally send one more byte on the bus after the
address, you are actually doing a 1-byte read or write. The variant
used by the Linux kernel for probing purposes is the "write" variant.

> >                             I am wondering if your code isn't sending
> > an extra (0) byte after the address when asked to send a zero-byte
> > message. That would be bad. Do you have a bus analyzer or scope to
> > check what exactly is being sent on the bus in this case?
> Yes I have a scope. I'll improve the driver some more and then check
> the actual data sent over the wires.

OK, thanks. I have to admit I am a bit curious how (if) you can send a
stop transaction on error without sending an extra byte with this chip.

Jean Delvare

<Prev in Thread] Current Thread [Next in Thread>