Commit 8d22f309 authored by Baruch Siach's avatar Baruch Siach Committed by Wolfram Sang

i2c: designware: retry transfer on transient failure

Set the i2c_adapter retries field to a sensible value. This allows the i2c core
to retry master_xfer() when it returns -EAGAIN. Currently the i2c-designware
driver returns -EAGAIN only on Tx arbitration failure (DW_IC_TX_ARB_LOST).
Reported-by: default avatarRolland Chau <zourongrong@gmail.com>
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent f199b260
...@@ -854,6 +854,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) ...@@ -854,6 +854,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
snprintf(adap->name, sizeof(adap->name), snprintf(adap->name, sizeof(adap->name),
"Synopsys DesignWare I2C adapter"); "Synopsys DesignWare I2C adapter");
adap->retries = 3;
adap->algo = &i2c_dw_algo; adap->algo = &i2c_dw_algo;
adap->dev.parent = dev->dev; adap->dev.parent = dev->dev;
i2c_set_adapdata(adap, dev); i2c_set_adapdata(adap, dev);
......
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