All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Lucas De Marchi
	<lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Jarkko Nikula
	<jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Fabio Mello <fabio.mello-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Lucas De Marchi
	<lucas.demarchi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Christian Ruppert
	<christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] i2c: designware: use enable on resume instead initialization
Date: Wed, 10 Jun 2015 10:07:22 +0300	[thread overview]
Message-ID: <20150610070722.GM1478@lahna.fi.intel.com> (raw)
In-Reply-To: <CAKi4VAJwD45VbWuCHegfkB-tbgvgza52-cgVNF4AxF8NCuYyRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Jun 09, 2015 at 03:29:01PM -0300, Lucas De Marchi wrote:
> Hi Mika,
> 
> On Tue, Jun 9, 2015 at 5:51 AM, Mika Westerberg
> <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
> > On Mon, Jun 08, 2015 at 02:50:28PM -0300, lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> >> From: Fabio Mello <fabio.mello-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >>
> >> According to documentation and tests, initialization is not
> >> necessary on module resume, since the controller keeps its state
> >> between disable/enable. Change the target address is also allowed.
> >>
> >> So, this patch replaces the initialization on module resume with a
> >> simple enable, and removes the (non required anymore) enables and
> >> disables.
> >>
> >> Signed-off-by: Fabio Mello <fabio.mello-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >> Signed-off-by: Lucas De Marchi <lucas.demarchi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >> ---
> >>
> >> These pictures explain a little more the consequence of letting the
> >> enable+disable in the code:
> >>
> >>       http://pub.politreco.com/paste/TEK0011-before.jpg
> >>       http://pub.politreco.com/paste/TEK0007-after.jpg
> >>
> >> The yellow line is a GPIO toggle in userspace to mark when we start and finish
> >> the i2c transactions.  The blue line is the SCL in that i2c bus. Take a look on
> >> the huge pauses we have between any 2 transactions.  These pauses are removed
> >> with this patch and we are able to read our sensor's values in 950usec rather
> >> than 5.24msec we had before.  We are testing this using a Minnowboard Max that
> >> has a designware i2c controller.
> >
> > Did you test this on any other platform than Intel Baytrail?
> 
> No. The only soc we have here with this controller is the Baytrail.

My concern is that this patch might break some non-Intel platform. It
would be nice if someone (Christian?) could try this out.

WARNING: multiple messages have this Message-ID (diff)
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: linux-i2c@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Fabio Mello <fabio.mello@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Christian Ruppert <christian.ruppert@abilis.com>
Subject: Re: [PATCH] i2c: designware: use enable on resume instead initialization
Date: Wed, 10 Jun 2015 10:07:22 +0300	[thread overview]
Message-ID: <20150610070722.GM1478@lahna.fi.intel.com> (raw)
In-Reply-To: <CAKi4VAJwD45VbWuCHegfkB-tbgvgza52-cgVNF4AxF8NCuYyRQ@mail.gmail.com>

On Tue, Jun 09, 2015 at 03:29:01PM -0300, Lucas De Marchi wrote:
> Hi Mika,
> 
> On Tue, Jun 9, 2015 at 5:51 AM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Mon, Jun 08, 2015 at 02:50:28PM -0300, lucas.de.marchi@gmail.com wrote:
> >> From: Fabio Mello <fabio.mello@intel.com>
> >>
> >> According to documentation and tests, initialization is not
> >> necessary on module resume, since the controller keeps its state
> >> between disable/enable. Change the target address is also allowed.
> >>
> >> So, this patch replaces the initialization on module resume with a
> >> simple enable, and removes the (non required anymore) enables and
> >> disables.
> >>
> >> Signed-off-by: Fabio Mello <fabio.mello@intel.com>
> >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> >> ---
> >>
> >> These pictures explain a little more the consequence of letting the
> >> enable+disable in the code:
> >>
> >>       http://pub.politreco.com/paste/TEK0011-before.jpg
> >>       http://pub.politreco.com/paste/TEK0007-after.jpg
> >>
> >> The yellow line is a GPIO toggle in userspace to mark when we start and finish
> >> the i2c transactions.  The blue line is the SCL in that i2c bus. Take a look on
> >> the huge pauses we have between any 2 transactions.  These pauses are removed
> >> with this patch and we are able to read our sensor's values in 950usec rather
> >> than 5.24msec we had before.  We are testing this using a Minnowboard Max that
> >> has a designware i2c controller.
> >
> > Did you test this on any other platform than Intel Baytrail?
> 
> No. The only soc we have here with this controller is the Baytrail.

My concern is that this patch might break some non-Intel platform. It
would be nice if someone (Christian?) could try this out.

  parent reply	other threads:[~2015-06-10  7:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 17:50 [PATCH] i2c: designware: use enable on resume instead initialization lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w
2015-06-08 17:50 ` lucas.de.marchi
     [not found] ` <1433785828-4100-1-git-send-email-lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-09  8:51   ` Mika Westerberg
2015-06-09  8:51     ` Mika Westerberg
     [not found]     ` <20150609085146.GD1478-3PARRvDOhMZrdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2015-06-09 18:29       ` Lucas De Marchi
2015-06-09 18:29         ` Lucas De Marchi
     [not found]         ` <CAKi4VAJwD45VbWuCHegfkB-tbgvgza52-cgVNF4AxF8NCuYyRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-10  7:07           ` Mika Westerberg [this message]
2015-06-10  7:07             ` Mika Westerberg
     [not found]             ` <OF847FFF39.1FF5F96A-ONC1257E60.00506AFD-C1257E60.0052A8CE@alitech.com>
     [not found]               ` <OF847FFF39.1FF5F96A-ONC1257E60.00506AFD-C1257E60.0052A8CE-Yycd8EPnGM5BDgjK7y7TUQ@public.gmane.org>
2015-06-11  9:38                 ` Mika Westerberg
2015-06-11  9:38                   ` Mika Westerberg
2015-06-11 14:48                 ` Lucas De Marchi
2015-06-11 14:48                   ` Lucas De Marchi
     [not found]             ` <OF847FFF39.1FF5F96A-ONC1257E60.00506AFD-C1257E60.0052A8CE@LocalDomain>
2015-06-23 16:45               ` christian.ruppert-Yycd8EPnGM5BDgjK7y7TUQ
2015-06-23 16:45                 ` christian.ruppert
     [not found]                 ` <OFB47A681B.5488F019-ONC1257E6D.005A6CD2-C1257E6D.005BD52F-Yycd8EPnGM5BDgjK7y7TUQ@public.gmane.org>
2015-06-23 17:02                   ` Lucas De Marchi
2015-06-23 17:02                     ` Lucas De Marchi
     [not found]                     ` <CAKi4VA+t3d-XoqDiL9ez+9qDR_ndgGnAOhkpZsJyJ2tMjfCYLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-24  7:36                       ` christian.ruppert-Yycd8EPnGM5BDgjK7y7TUQ
2015-06-24  7:36                         ` christian.ruppert
     [not found]                         ` <OFB918064C.F72245F4-ONC1257E6E.00287EC7-C1257E6E.00299EF2-Yycd8EPnGM5BDgjK7y7TUQ@public.gmane.org>
2015-06-24 11:27                           ` Mika Westerberg
2015-06-24 11:27                             ` Mika Westerberg
     [not found]                             ` <20150624112723.GE827-3PARRvDOhMZrdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2015-06-24 12:56                               ` De Marchi, Lucas
2015-06-24 12:56                                 ` De Marchi, Lucas
     [not found]                                 ` <1435150578.1075.5.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-06-24 13:18                                   ` mika.westerberg-VuQAYsv1563Yd54FQh9/CA
2015-06-24 13:18                                     ` mika.westerberg
2015-06-24 14:06                                   ` christian.ruppert-Yycd8EPnGM5BDgjK7y7TUQ
2015-06-24 14:06                                     ` christian.ruppert
2015-06-10  7:55   ` Mika Westerberg
2015-06-10  7:55     ` Mika Westerberg
     [not found]     ` <20150610075555.GO1478-3PARRvDOhMZrdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2015-06-12 22:45       ` Lucas De Marchi
2015-06-12 22:45         ` Lucas De Marchi
2015-06-15  9:29         ` Mika Westerberg

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=20150610070722.GM1478@lahna.fi.intel.com \
    --to=mika.westerberg-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org \
    --cc=fabio.mello-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=lucas.demarchi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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.