Commit 0520628e authored by taolan's avatar taolan Committed by Wolfram Sang

i2c: hix5hd2: Add I2C_M_STOP flag support for i2c-hix5hd2 driver.

For compatibility, some devices need to work with controller between
messages using a stop.
Signed-off-by: default avatartaolan <taolan@huawei.com>
Acked-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 9d178e00
......@@ -360,7 +360,11 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
pm_runtime_get_sync(priv->dev);
for (i = 0; i < num; i++, msgs++) {
stop = (i == num - 1);
if ((i == num - 1) || (msgs->flags & I2C_M_STOP))
stop = 1;
else
stop = 0;
ret = hix5hd2_i2c_xfer_msg(priv, msgs, stop);
if (ret < 0)
goto out;
......
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