[i2c] [PATCH] i2c: i2c-au1550: properly terminate zero-byte transfers
Jean Delvare
khali at linux-fr.org
Fri Jan 18 08:33:35 CET 2008
Hi Manuel,
On Thu, 17 Jan 2008 17:37:33 +0100, Manuel Lauss wrote:
> On Thu, Jan 17, 2008 at 04:52:30PM +0100, Jean Delvare wrote:
> > Hi Manuel,
> >
> > This approach looks much nicer than your previous proposal. I like it.
> > Applied, thanks!
>
> Thank you, however there's still the problem with unterminated bus xfers
> after receiving a NAK. I've only seen them with a PCA9539 if one's trying
> to access a non-existant register. However it can't be solved to everyones
> satisfaction I'm afraid...
> (see http://mlau.at/files/i2c-au1550-stopfix-1-behav_2.png )
Indeed. As I understand it, the hardware simply offers no clean
solution to this problem, as you have to ask for the stop condition
before you send an address or data byte. As you can't foresee
transaction failures, you just can't ask for the stop condition before
the failure (or simply nack) happens. Which means that you either don't
send a stop condition at all (what the driver does now) or you send an
extra byte before the stop condition (slightly better but still not
perfect.) Or maybe you have to read the datasheet in details to find
out how to do the right thing, some chips can be very tricky in this
respect.
Anyway, I will take whatever patch you think will improve the situation
on this platform.
--
Jean Delvare
More information about the i2c
mailing list