Setting MSTA in I2CR signals a start condition on the bus. In a multi-master scenario, this could clobber a transaction already in progress. Signed-off-by: Steven Weaver <steve@xxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c406700789e1..4720db608489 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -536,6 +536,9 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx) usleep_range(50, 150); /* Start I2C transaction */ + result = i2c_imx_bus_busy(i2c_imx, 1); + if (result) + return result; temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR); temp |= I2CR_MSTA; imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR); -- 2.16.4