[i2c] AT91 bus driver loses data
khali at linux-fr.org
Thu Feb 15 17:43:39 CET 2007
On Thu, 15 Feb 2007 15:12:55 +0100, Ronny Nilsson wrote:
> > OK, I see it's hard-coded to 100kHz in the driver. Try dropping that
> > to ~10kHz and see what happens. If things still don't improve, then
> > you can either try to find and kill the big interrupt blocker or slow
> > down the bus even more.
> I totally agree, busy waiting is awfully awkward! I spent about two
> days just for trying to get wait_event() working before giving that
> up... It *is* possible to reduce the wire speed though as a workaround.
> At a clockrate of 50 kHz it works fairly well to sleep the system
> friendly way. If adding some safety margin we get about 30 kHz.
> However, I was thinking that no one would accept that kind of slow
> speed so I discarded it. I'm not sure of what speed a bit banging
> interface achieve but I'm imagining it's in that range too.
> I can rollback to wait_event_timeout(), but is people going to accept
> that low speed?
Most SMBus masters drive the bus at 16 kHz. Bit-banging interfaces can
do anything between 5 and 55 kHz depending on the value of .udelay.
Given that you rarely transfer large amounts of data over I2C anyway,
the speed doesn't matter that much. Of course faster is better, but
slower and reliable is better than faster and unreliable.
More information about the i2c