All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH] i2c-omap: Set latency requirements only once for several messages
Date: Tue, 16 Nov 2010 08:19:36 -0800	[thread overview]
Message-ID: <87wrodi6lj.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1289896100-28881-1-git-send-email-samu.p.onkalo@nokia.com> (Samu Onkalo's message of "Tue, 16 Nov 2010 10:28:20 +0200")

Samu Onkalo <samu.p.onkalo@nokia.com> writes:

> Ordinary I2C read consist of two messages. First a write operation
> to tell register address and then read operation to get data.
> CPU wake up latency is set and removed twice in read case.
> Set latency requirement before the message processing loop
> and remove the requirement after the loop to remove latency
> adjustment operations between the messages.
>
> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

Samu,

Can you collect the acks and repost to linux-i2c@vger.kernel.org 
and Cc Ben Dooks <ben-linux@fluff.org>.

This one should go upstream via Ben.

Thanks,

Kevin

> ---
>  drivers/i2c/busses/i2c-omap.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index b33c785..3e9323e 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -616,12 +616,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
>  	 * REVISIT: We should abort the transfer on signals, but the bus goes
>  	 * into arbitration and we're currently unable to recover from it.
>  	 */
> -	if (dev->set_mpu_wkup_lat != NULL)
> -		dev->set_mpu_wkup_lat(dev->dev, dev->latency);
>  	r = wait_for_completion_timeout(&dev->cmd_complete,
>  					OMAP_I2C_TIMEOUT);
> -	if (dev->set_mpu_wkup_lat != NULL)
> -		dev->set_mpu_wkup_lat(dev->dev, -1);
>  	dev->buf_len = 0;
>  	if (r < 0)
>  		return r;
> @@ -672,12 +668,18 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
>  	if (r < 0)
>  		goto out;
>  
> +	if (dev->set_mpu_wkup_lat != NULL)
> +		dev->set_mpu_wkup_lat(dev->dev, dev->latency);
> +
>  	for (i = 0; i < num; i++) {
>  		r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1)));
>  		if (r != 0)
>  			break;
>  	}
>  
> +	if (dev->set_mpu_wkup_lat != NULL)
> +		dev->set_mpu_wkup_lat(dev->dev, -1);
> +
>  	if (r == 0)
>  		r = num;

  parent reply	other threads:[~2010-11-16 16:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16  8:28 [PATCH] i2c-omap: Set latency requirements only once for several messages Samu Onkalo
2010-11-16 10:58 ` Paul Walmsley
2010-11-16 16:19 ` Kevin Hilman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-18 10:04 Samu Onkalo
     [not found] ` <1290074660-2640-1-git-send-email-samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-12-03  2:37   ` Ben Dooks
     [not found]     ` <20101203023751.GF20097-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-12-03  6:43       ` samu.p.onkalo-xNZwKgViW5gAvxtiuMwx3w
2010-12-03  8:31         ` Paul Walmsley

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=87wrodi6lj.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=samu.p.onkalo@nokia.com \
    --cc=tony@atomide.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 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.