linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Vishwanath BS <vishwanath.bs-l0cyMroinI0@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Partha Basak <p-basak2-l0cyMroinI0@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
	Kevin Hilman
	<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>,
	Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Subject: Re: [PATCH V2] I2C: Fix for suspend/resume issue in i2c-core
Date: Sat, 4 Sep 2010 14:16:25 +0200	[thread overview]
Message-ID: <20100904141625.45ce0196@hyperion.delvare> (raw)
In-Reply-To: <1283590081-14593-1-git-send-email-vishwanath.bs-l0cyMroinI0@public.gmane.org>

On Sat,  4 Sep 2010 14:18:01 +0530, Vishwanath BS wrote:
> In current i2c core driver, call to pm_runtime_set_active from i2c_device_pm_resume
> will unconditionally enable i2c module and increment child count of the parent.
> Because of this, in CPU Idle path, i2c does not idle, preventing Core to
> enter retention. Also i2c module will not be suspended upon system suspend as
> pm_runtime_set_suspended is not called from i2c_device_pm_suspend.
> This issue is fixed by  removing  pm_runtime_set_active call from resume path which
> is not necessary.
> This fix has been tested on OMAP4430.
> 
> Signed-off-by: Partha Basak <p-basak2-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Vishwanath BS <vishwanath.bs-l0cyMroinI0@public.gmane.org>
> 
> Cc: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
> Cc: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> ---
>  drivers/i2c/i2c-core.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
>  mode change 100644 => 100755 drivers/i2c/i2c-core.c
> 
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> old mode 100644
> new mode 100755
> index 6649176..13927d5
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -216,12 +216,6 @@ static int i2c_device_pm_resume(struct device *dev)
>  	else
>  		ret = i2c_legacy_resume(dev);
>  
> -	if (!ret) {
> -		pm_runtime_disable(dev);
> -		pm_runtime_set_active(dev);
> -		pm_runtime_enable(dev);
> -	}
> -
>  	return ret;
>  }
>  

Applied, thanks.

-- 
Jean Delvare

      parent reply	other threads:[~2010-09-04 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-04  8:48 [PATCH V2] I2C: Fix for suspend/resume issue in i2c-core Vishwanath BS
     [not found] ` <1283590081-14593-1-git-send-email-vishwanath.bs-l0cyMroinI0@public.gmane.org>
2010-09-04 10:11   ` Cousson, Benoit
2010-09-04 12:16   ` Jean Delvare [this message]

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=20100904141625.45ce0196@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=p-basak2-l0cyMroinI0@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    --cc=vishwanath.bs-l0cyMroinI0@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 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).