diff options
author | Baruch Siach <baruch@tkos.co.il> | 2015-12-23 18:43:24 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-01-10 09:24:56 +0100 |
commit | 8d22f309384cc410da91543f1eb30fe5daf91c3b (patch) | |
tree | 5da3140835580b043a10e9863e95fae19357bd48 /drivers/i2c | |
parent | f199b2605c25a0076cdd5c6a9e7eece77f95ce61 (diff) | |
download | linux-8d22f309384cc410da91543f1eb30fe5daf91c3b.tar.gz linux-8d22f309384cc410da91543f1eb30fe5daf91c3b.tar.bz2 linux-8d22f309384cc410da91543f1eb30fe5daf91c3b.zip |
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: Rolland Chau <zourongrong@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 8c48b27ba059..8055cbd4cba1 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -854,6 +854,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) snprintf(adap->name, sizeof(adap->name), "Synopsys DesignWare I2C adapter"); + adap->retries = 3; adap->algo = &i2c_dw_algo; adap->dev.parent = dev->dev; i2c_set_adapdata(adap, dev); |