From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Baruch Siach <baruch@tkos.co.il>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
Rolland Chau <zourongrong@gmail.com>
Subject: Re: [PATCH] i2c: designware: retry transfer on transient failure
Date: Wed, 23 Dec 2015 18:51:47 +0200 [thread overview]
Message-ID: <1450889507.30729.311.camel@linux.intel.com> (raw)
In-Reply-To: <a34c8973420a179cb195ddcfbb29ef1728f32ba3.1450889004.git.baruch@tkos.co.il>
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 <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);
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2015-12-23 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 16:43 [PATCH] i2c: designware: retry transfer on transient failure Baruch Siach
2015-12-23 16:51 ` Andy Shevchenko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450889507.30729.311.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=baruch@tkos.co.il \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
--cc=zourongrong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).