Commit ca741da1 authored by Troy Kisky's avatar Troy Kisky Committed by Heiko Schocher
Browse files

mxc_i2c: change slave addr if conflicts with destination.

The i2c controller cannot be both master and slave in the
same transaction.
Signed-off-by: default avatarTroy Kisky <>
parent 90a5b70f
......@@ -223,6 +223,8 @@ static int i2c_init_transfer(struct mxc_i2c_regs *i2c_regs,
/* Wait for controller to be stable */
if (readb(&i2c_regs->iadr) == (chip << 1))
writeb((chip << 1) ^ 2, &i2c_regs->iadr);
writeb(0, &i2c_regs->i2sr);
ret = wait_for_sr_state(i2c_regs, ST_BUS_IDLE);
if (ret < 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment