linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "De Marchi, Lucas" <lucas.demarchi@intel.com>
To: "jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Cc: "mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"christian.ruppert@alitech.com" <christian.ruppert@alitech.com>,
	"Souza, Jose" <jose.souza@intel.com>
Subject: Re: [PATCH v3 2/3] i2c: designware: detect when dynamic tar update is possible
Date: Wed, 17 Aug 2016 12:48:56 +0000	[thread overview]
Message-ID: <1471438125.2406.6.camel@intel.com> (raw)
In-Reply-To: <c58ce503-580b-34b7-3489-7b8829f88dca@linux.intel.com>

On Wed, 2016-08-17 at 11:05 +0300, Jarkko Nikula wrote:
> On 08/16/2016 05:07 PM, De Marchi, Lucas wrote:
> > 
> > On Tue, 2016-08-16 at 17:00 +0300, Jarkko Nikula wrote:
> > > 
> > > > 
> > > > +	 */
> > > > +	reg = dw_readl(dev, DW_IC_CON);
> > > > +	dw_writel(dev, reg ^ DW_IC_CON_10BITADDR_MASTER,
> > > > DW_IC_CON);
> > > > +
> > > > +	if ((dw_readl(dev, DW_IC_CON) &
> > > > DW_IC_CON_10BITADDR_MASTER) ==
> > > > +	    (reg & DW_IC_CON_10BITADDR_MASTER)) {
> > > > +		dev->dynamic_tar_update_enabled = true;
> > > > +		dev_dbg(dev->dev, "Dynamic TAR update
> > > > enabled");
> > > > +	}
> > > 
> > > Is this possible to move to i2c_dw_probe()? I guess the enabled
> > > status
> > > doesn't change runtime?
> > 
> > It was actually useful at this place during development of this
> > patch
> > because we could check any unexpected change in behavior when
> > resuming.
> > We did catch a bug because of this and fixed.
> > I'm not sure if now it makes more sense to move to probe method.
> > I'd
> > leave it where it is, but I'm open to move it there.
> > 
> Can you do a quick re-test that case to see does it change runtime?
> If 
> it does then this needs a comment why there is need to do this check 
> each time when HW is reinitialized. Otherwise there is chance
> someone 
> may move this code to probe time in the future.

I already tested and it doesn't change. I'll move it to i2c_dw_probe()
then.

thanks

Lucas De Marchi

  reply	other threads:[~2016-08-17 12:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 22:03 [PATCH v3 0/3] i2c: designware: improve performance for transfers Lucas De Marchi
2016-07-28 22:03 ` [PATCH v3 1/3] i2c: designware: wait for disable/enable only if necessary Lucas De Marchi
2016-08-16 13:59   ` Jarkko Nikula
2016-07-28 22:03 ` [PATCH v3 2/3] i2c: designware: detect when dynamic tar update is possible Lucas De Marchi
2016-08-16 14:00   ` Jarkko Nikula
2016-08-16 14:07     ` De Marchi, Lucas
2016-08-17  8:05       ` Jarkko Nikula
2016-08-17 12:48         ` De Marchi, Lucas [this message]
2016-07-28 22:03 ` [PATCH v3 3/3] i2c: designware: do not disable adapter after transfer Lucas De Marchi
2016-08-16 14:00   ` Jarkko Nikula
2016-08-12 14:59 ` [PATCH v3 0/3] i2c: designware: improve performance for transfers Christian Ruppert
2016-08-15 12:34   ` De Marchi, Lucas
2016-08-16 12:14     ` 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=1471438125.2406.6.camel@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=christian.ruppert@alitech.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jose.souza@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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).