All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Phil Reid <preid@electromag.com.au>,
	andriy.shevchenko@linux.intel.com,
	mika.westerberg@linux.intel.com, wsa@the-dreams.de,
	tim@krieglstein.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v3 4/4] i2c: designware: add i2c gpio recovery option
Date: Thu, 28 Sep 2017 16:21:16 +0300	[thread overview]
Message-ID: <ec3abe75-ff3d-8e19-3f7b-08f822e654e4@linux.intel.com> (raw)
In-Reply-To: <1504073857-122449-5-git-send-email-preid@electromag.com.au>

On 08/30/2017 09:17 AM, Phil Reid wrote:
> From: Tim Sander <tim@krieglstein.org>
> 
> This patch contains much input from Phil Reid and has been tested
> on Intel/Altera Cyclone V SOC Hardware with Altera GPIO's for the
> SCL and SDA GPIO's. I am still a little unsure about the recover
> in the timeout case (i2c-designware-core.c:770) as i could not
> test this codepath.
> 
> Signed-off-by: Tim Sander <tim@krieglstein.org>
> Signed-off-by: Phil Reid <preid@electromag.com.au>
> ---
>   drivers/i2c/busses/i2c-designware-common.c | 11 ++++--
>   drivers/i2c/busses/i2c-designware-core.h   |  1 +
>   drivers/i2c/busses/i2c-designware-master.c | 57 ++++++++++++++++++++++++++++++
>   3 files changed, 66 insertions(+), 3 deletions(-)
> 
While taking into account Andy's comments please modify the last 
sentence in the above commit log - i2c-designware-core.c doesn't exist 
anymore. Maybe better is to have the uncertainty documented as a 
"REVISIT:" comment in the code etc.

> @@ -254,9 +258,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
>   	for_each_set_bit(i, &abort_source, ARRAY_SIZE(abort_sources))
>   		dev_err(dev->dev, "%s: %s\n", __func__, abort_sources[i]);
>   
> -	if (abort_source & DW_IC_TX_ARB_LOST)
> +	if (abort_source & DW_IC_TX_ARB_LOST) {
> +		i2c_recover_bus(&dev->adapter);

Are you sure about doing recovery for arbitration lost case? To me it 
seems wrong to do it if another master is accessing the bus.

-- 
Jarkko

  parent reply	other threads:[~2017-09-28 13:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  6:17 [PATCH v3 0/4] i2c: designware: add i2c gpio recovery option Phil Reid
2017-08-30  6:17 ` [PATCH v3 1/4] i2c: Switch to using gpiod interface for gpio bus recovery Phil Reid
2017-09-28 10:44   ` Andy Shevchenko
2017-09-28 10:54     ` Jarkko Nikula
2017-09-28 10:58       ` Andy Shevchenko
2017-09-29  6:59         ` Phil Reid
2017-09-29 11:48           ` Andy Shevchenko
2017-08-30  6:17 ` [PATCH v3 2/4] i2c: designware: move i2c_dw_plat_prepare_clk to common Phil Reid
2017-09-28 13:01   ` Jarkko Nikula
2017-08-30  6:17 ` [PATCH v3 3/4] i2c: designware: rename i2c_dw_plat_prepare_clk to i2c_dw_prepare_clk Phil Reid
2017-09-28 13:01   ` Jarkko Nikula
2017-08-30  6:17 ` [PATCH v3 4/4] i2c: designware: add i2c gpio recovery option Phil Reid
2017-09-28 10:58   ` Andy Shevchenko
2017-09-29  7:00     ` Phil Reid
2017-09-28 13:21   ` Jarkko Nikula [this message]
2017-10-06  5:56     ` Phil Reid
2017-09-28  7:37 ` [PATCH v3 0/4] " Phil Reid
2017-09-28  9:55   ` Jarkko Nikula
2017-09-28 10:55   ` Andy Shevchenko
2017-10-04  9:41     ` Ferry Toth

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=ec3abe75-ff3d-8e19-3f7b-08f822e654e4@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=preid@electromag.com.au \
    --cc=tim@krieglstein.org \
    --cc=wsa@the-dreams.de \
    /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 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.