Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: Fix for suspend/resume issue

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>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Vishwanath BS and committed by
Jean Delvare
753419f5 59bfee6e

-6
-6
drivers/i2c/i2c-core.c
··· 216 216 else 217 217 ret = i2c_legacy_resume(dev); 218 218 219 - if (!ret) { 220 - pm_runtime_disable(dev); 221 - pm_runtime_set_active(dev); 222 - pm_runtime_enable(dev); 223 - } 224 - 225 219 return ret; 226 220 } 227 221