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
Wolfram Sang 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 stretching just before
Joakim Tjernlund/Transmode wrote on 2012/09/02 16:22:00:
>
> Tabi Timur-B04825 wrote on 2012/09/02 04:48:01:
> > On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund
> > wrote:
> >
> > > - mpc_i2c_stop(i2c);
> > > + mpc_i2c_stop(i2c); /* Initiate STOP */
> > > + orig_jiffies = jiff
Tabi Timur-B04825 wrote on 2012/09/02 04:48:01:
> On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund
> wrote:
>
> > - mpc_i2c_stop(i2c);
> > + mpc_i2c_stop(i2c); /* Initiate STOP */
> > + orig_jiffies = jiffies;
> > + /* Wait until STOP is seen, allow up to 1 s */
> > +
On Thu, Aug 30, 2012 at 5:40 AM, Joakim Tjernlund
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) & CSR_MBB) {
> +
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 Tjernl