On Sat, 1 Nov 2003, Jean Delvare wrote: > > Modified Files: > > i2c-algo-bit.c > > Log Message: > > (Khali) Fix sclhi() for adapters that do not have getscl(). > > Enable bit_test for adapters that do not have getscl(). > > Mostly rewrite test_bus(), cleaner and probably faster. > > I'd like reviewers and testers on this, since I plan to submit a similar > for Linux 2.6. There are two distinct changes: > > 1* Fixed sclhi() for adapters that do not have getscl(). It looks like > there was a udelay call missing in this case. 1* Your fix for adapters not capable of reading SCL looks correct. I introduced this bug as I moved udelay() call _after_ SCL is read back as HIGH. Purpose of udelay() there is to guarantee SCL HIGH time. I think we agree upon this change? But, the bus has some capacitance and first call(s) to getscl() after setscl(1) are likely to return LOW. This may slow down transmission and generate undesirable amount of scheduling as cond_resched() is called. Results of my bug fix: Earlier it could, rarely, output very short SCL high pulses. Now it will, likely, output very long SCL high pulses. To see i2c-algo-biths solution, search for "rdcount". -- Ky?sti M?lkki <kyosti.malkki at welho.com> +358 50 462 8786