kernel/spec-i2c: bugfix: add delays in bitbanging i2c
This is a long-standing bug, and completely my fault. Since our i2c
is simply a bitbanging gpio-based interface, I need to add some delays
into the operations. Without this, accessing eeprom worked with most
mezzanines but not with all of them. The measured speed was more than 1MHz.
The devices are rated at 400kHz, so delay 1.25 usecs at each output
operation (thus, writing is three such delay for each bit). Addin the
unpredictable software delays I see slightly more than than 200kHz
in my test system.
The driver now takes 2.5s to read the whole eeprom, but there's ample
space to make it better by fixing the FIXME in spec-i2c.c .
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
Please register or sign in to comment