rockchip: i2c: don't sent stop bit after each message
That's not correct and it breaks SMBUS-style reads and and writes for
some chips (e.g. SYR82X/SYR83X).
Stop bit should be sent only after the last message.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index cdd94bb..32b2ee8 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -253,7 +253,6 @@
}
i2c_exit:
- rk_i2c_send_stop_bit(i2c);
rk_i2c_disable(i2c);
return err;
@@ -332,7 +331,6 @@
}
i2c_exit:
- rk_i2c_send_stop_bit(i2c);
rk_i2c_disable(i2c);
return err;
@@ -360,6 +358,9 @@
}
}
+ rk_i2c_send_stop_bit(i2c);
+ rk_i2c_disable(i2c);
+
return 0;
}