From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: [PATCH V2] I2C: Fix for suspend/resume issue in i2c-core Date: Sat, 4 Sep 2010 14:16:25 +0200 Message-ID: <20100904141625.45ce0196@hyperion.delvare> References: <1283590081-14593-1-git-send-email-vishwanath.bs@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1283590081-14593-1-git-send-email-vishwanath.bs-l0cyMroinI0@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vishwanath BS Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Partha Basak , "Rafael J. Wysocki" , Kevin Hilman , Ben Dooks List-Id: linux-i2c@vger.kernel.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 > Signed-off-by: Vishwanath BS > > Cc: Rafael J. Wysocki > Cc: Kevin Hilman > Cc: Ben Dooks > Cc: Jean Delvare > --- > 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