[i2c] Is review of AT91 patch pending?

arasv at magtech.com.au arasv at magtech.com.au
Tue Sep 25 01:03:43 CEST 2007


> Hi
> I know, there are still some things to be done. That's why I'm asking
> for a review. My main concern currently is the design and basic flow,
> cleanups will follow when the driver otherwise is finished.

I'm currently on holidays until October but I can do some good hardware
testing of any patches in about a week.


>> My notes also say the CONFIG_I2C_CLOCKRATE seems odd ... if that's
>> actual bits-per-second, then why is the default 10K not 100K,
>
> It's a suggestion from Mark Hoffman earlier this year:
> 	http://lists.lm-sensors.org/pipermail/i2c/2007-February/000820.html
> I made some serious benchmarks of the patch before posting it (huge
> amounts of data was transferred):
> 	400 kHz  Never works
> 	100 kHz  Works when cpu is idle
> 	50 kHz   Works, even when cpu is very heavily loaded
> 	30 kHz   My safety margin
> 	10 kHz   Marks safety margin

Not all i2c peripheral devices are rated for 400KHz, so double check that.
The top i2c rate is very much a hardware dependent issue. It depends on line
capacitance and the pull-up resistor. Anything above 100kHz would have to be
verified with an oscilloscope to make sure that it isn't a physical
limitation, rather than a kernel one.

30KHz and 10KHz are way too slow for what we require, and I think many people
would find it unacceptable.


> It's a design issue. The user can try his particular system for the
> maximum speed it'll cope - given that it depends on system load and cpu
> clockspeed.

... and line capacitance, line pull-up current, and i2c peripheral rating.


> I believe you, however I haven't had any problems either after lowering
> the bitclock to 50 kHz and applying my patch. Ideally I think it should
> be up to the user. i2c-gpio is somewhat more reliable but increases
> overhead and cpu load. i2c-at91 works well but might lose a couple of
> bytes in *extreme* situations.

Sorry, but you just can't say to a customer, "Avoid extreme conditions,
otherwise it will lose a couple of bytes" :P

This is software that is going in to tens of thousands (in my case) of
products all around the world. It has to be as reliable as I can knowingly
make it otherwise *I* get a phone call to come and explain why it doesn't
work all the time.

As I said earlier, I'm happy to perform a test in a week or so. I'm very good
at creating those extreme conditions as I have a knack of breaking things.

Aras


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the i2c mailing list