[PATCH v6 1/2] i2c: imx: add DMA support for freescale i2c driver

Yao Yuan yao.yuan at freescale.com
Thu Aug 7 01:04:58 PDT 2014


Hi Fugang,

> >> >+	/* Waiting for Transfer complete. */
> >> >+	while (timeout--) {
> >> >+		temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR);
> >> >+		if (temp & I2SR_ICF)
> >> >+			break;
> >> >+		udelay(10);
> >> >+	}
> >> Whether there have better method like interrupt to avoid dead wait
> >> here until timeout ?
> >
> >Can you give me more suggestion? We have discussed it with our team, It
> >seems the short query wait is necessary.
> >
> At least, you can use schdule_timeout() instead of udelay() ?

In fact, the waiting time normally is less than 10-50us, but the minimum time interval for schdule_timeout() is 1 jiffies.
So maybe schdule_timeout() is not very necessary?




Thanks for your review.

Best Regards,
Yuan Yao



More information about the linux-arm-kernel mailing list