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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

On Wed, May 16, 2007 at 03:38:22PM +0200, Jean Delvare wrote:
> Hi Manuel,
> 
> 1* It looks to me like there are other error conditions which also
> cause the driver to leave without issuing a stop condition on the bus:
> if not all bytes of a write are acked by the target slave (in
> i2c_write) or if the master receives less bytes than expected (in
> i2c_read). I understand these are less likely to happen than the quick
> write case which bit you, but shouldn't these bugs be fixed as well?

Hm, didn't think about those (because I didn't hit them yet)
I'll fix them too of course. (I even started a complete rewrite of this
driver [using IRQ and DMA instead of polling] a few months back but got
stuck and instead fixed the bug that annoyed me the most)
 
> 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.

>                             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.

Thank you for your review, much appreciated!
	Manuel Lauss


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux