> > Hi Jocke, > > I changed the force_reinit() to > > // Disable interrupts. > i2c->i2c_i2cmr = 0; > i2c->i2c_i2cer = 0xff; > // Clear enable > i2c->i2c_i2mod &= ~1; > // Reset internal state > iip->iic_rstate = 0; > iip->iic_tstate = 0; > > This seems to work and is less code than my old force_reinit(). > On the other hand: This kind of CPM timeout will only occur on heavy I2C > bus conflicts. They should not appear at all. The code will not be executed > if a slave device does not answer! The original driver is from the year > 2001 and nobody has mentioned problems of this kind before. Without > detailed knowledge of the CPM internals I feel much safer using my old > force_reinit(), which does a complete re-init.
Good, however I think we should try to it simple, the code that is, and avoid unneded bloat. I would like to see the shorter version in the kernel. Jocke