
Dear Timur Tabi,
In message 4AA12E52.2080403@freescale.com you wrote:
Wrong Question. I don't know enough about the I2C protocol. Why is i2c_wait4bus necessary?
Ok, why is it necessary?
Maybe we should remove it, when nobody knows why it's needed.
Kumar, any thoughts? Is there something sneaky going on here, or did you just misinterpret the value of I2C_TIMEOUT?
I guess I2C_TIMEOUT might always have been misinterpeted.
I think the original code was correct, because it was counting clock ticks.
It cannot have been correct. get_timer() takes an argument of milliseconds, i. e. a time. "(CONFIG_SYS_HZ / 4)" is a frequency, i. e. not a time, but the inverse of it.
It is plain wront to write "250 per second" when you mean "250 milliseconds"
Best regards,
Wolfgang Denk