From: Vishwanath BS <vishwanath.bs@ti.com>
To: linux-i2c@vger.kernel.org
Cc: linux-omap@vger.kernel.org, Vishwanath BS <vishwanath.bs@ti.com>,
Partha Basak <p-basak2@ti.com>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Kevin Hilman <khilman@deeprootsystems.com>,
Ben Dooks <ben-linux@fluff.org>,
Jean Delvare <khali@linux-fr.org>
Subject: [PATCH V2] I2C: Fix for suspend/resume issue in i2c-core
Date: Sat, 4 Sep 2010 14:18:01 +0530 [thread overview]
Message-ID: <1283590081-14593-1-git-send-email-vishwanath.bs@ti.com> (raw)
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@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jean Delvare <khali@linux-fr.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;
}
--
1.7.0.4
next reply other threads:[~2010-09-04 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-04 8:48 Vishwanath BS [this message]
[not found] ` <1283590081-14593-1-git-send-email-vishwanath.bs-l0cyMroinI0@public.gmane.org>
2010-09-04 10:11 ` [PATCH V2] I2C: Fix for suspend/resume issue in i2c-core Cousson, Benoit
2010-09-04 12:16 ` Jean Delvare
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=1283590081-14593-1-git-send-email-vishwanath.bs@ti.com \
--to=vishwanath.bs@ti.com \
--cc=ben-linux@fluff.org \
--cc=khali@linux-fr.org \
--cc=khilman@deeprootsystems.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=p-basak2@ti.com \
--cc=rjw@sisk.pl \
/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).