All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: designware: retry transfer on transient failure
@ 2015-12-23 16:43 Baruch Siach
  2015-12-23 16:51 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Baruch Siach @ 2015-12-23 16:43 UTC (permalink / raw)
  To: Andy Shevchenko, Jarkko Nikula, Mika Westerberg
  Cc: linux-i2c, Wolfram Sang, Rolland Chau, Baruch Siach

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>
---
 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 de7fbbb374cd..f7b34b360dc9 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);
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-10  8:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-23 16:43 [PATCH] i2c: designware: retry transfer on transient failure Baruch Siach
2015-12-23 16:51 ` Andy Shevchenko
2015-12-28 16:34 ` Andy Shevchenko
2016-01-04 19:49   ` Wolfram Sang
2016-01-05 12:22     ` Andy Shevchenko
2016-01-06  4:40       ` Baruch Siach
2016-01-07 12:32         ` Andy Shevchenko
2016-01-10  8:25 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.