On Wed, 2015-12-23 at 18:43 +0200, Baruch Siach wrote:
> 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).

While this patch looks okay I have another proposal.
Let me time I'm going to mock up the idea.

> 
> Reported-by: Rolland Chau <zourongr...@gmail.com>
> Signed-off-by: Baruch Siach <bar...@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);

-- 
Andy Shevchenko <andriy.shevche...@linux.intel.com>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to