[linux-yocto] [PATCH 15/17] i2c: designware: retry transfer on transient failure
weifeng.voon at intel.com
weifeng.voon at intel.com
Thu Mar 24 18:38:11 PDT 2016
From: Baruch Siach <baruch at tkos.co.il>
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 at gmail.com>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Acked-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Signed-off-by: Wolfram Sang <wsa at the-dreams.de>
(cherry picked from commit 8d22f309384cc410da91543f1eb30fe5daf91c3b)
Signed-off-by: Voon, Weifeng <weifeng.voon at intel.com>
---
drivers/i2c/busses/i2c-designware-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
index de7fbbb..f7b34b3 100644
--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
@@ -860,6 +860,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);
--
1.9.1
More information about the linux-yocto
mailing list