Re: [PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-09-14 Thread Joakim Tjernlund
Wolfram Sang w.s...@pengutronix.de wrote on 2012/09/14 16:02:34: On Thu, Aug 30, 2012 at 12:40:04PM +0200, Joakim Tjernlund wrote: mpc_i2c_stop() only initiates STOP but does not wait for it to hit the I2C bus. This is a problem when using I2C devices which uses fairly long clock

Re: [PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-09-14 Thread Wolfram Sang
On Thu, Aug 30, 2012 at 12:40:04PM +0200, Joakim Tjernlund wrote: mpc_i2c_stop() only initiates STOP but does not wait for it to hit the I2C bus. This is a problem when using I2C devices which uses fairly long clock stretching just before STOP if you also have an i2c-mux which may switch to

Re: [PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-09-11 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 2012/09/02 16:22:00: Tabi Timur-B04825 b04...@freescale.com wrote on 2012/09/02 04:48:01: On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: - mpc_i2c_stop(i2c); + mpc_i2c_stop(i2c); /* Initiate STOP

Re: [PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-09-02 Thread Joakim Tjernlund
Tabi Timur-B04825 b04...@freescale.com wrote on 2012/09/02 04:48:01: On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: - mpc_i2c_stop(i2c); + mpc_i2c_stop(i2c); /* Initiate STOP */ + orig_jiffies = jiffies; + /* Wait until

Re: [PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-09-01 Thread Tabi Timur-B04825
On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: - mpc_i2c_stop(i2c); + mpc_i2c_stop(i2c); /* Initiate STOP */ + orig_jiffies = jiffies; + /* Wait until STOP is seen, allow up to 1 s */ + while (readb(i2c-base + MPC_I2C_SR)

[PATCH] i2c-mpc: Wait for STOP to hit the bus

2012-08-30 Thread Joakim Tjernlund
mpc_i2c_stop() only initiates STOP but does not wait for it to hit the I2C bus. This is a problem when using I2C devices which uses fairly long clock stretching just before STOP if you also have an i2c-mux which may switch to another bus before STOP has been processed. Signed-off-by: Joakim