[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150520125553.GV1490@lahna.fi.intel.com>
Date: Wed, 20 May 2015 15:55:53 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Jisheng Zhang <jszhang@...vell.com>
Cc: wsa@...-dreams.de, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] i2c: designware: separate ops for system_sleep_pm and
runtime_pm
On Wed, May 20, 2015 at 08:34:30PM +0800, Jisheng Zhang wrote:
> Dear Mika,
>
> On Wed, 20 May 2015 15:15:06 +0300
> Mika Westerberg <mika.westerberg@...ux.intel.com> wrote:
>
> > On Wed, May 20, 2015 at 07:34:22PM +0800, Jisheng Zhang wrote:
> > > Sorry for confusion. Considering one platform which doesn't support power off
> > > the i2c host but it can disable the host's clock. So in such platform, when
> > > the host is runtime suspended, its clock is disabled, then i2c_dw_disable() will
> > > hang when s2ram.
> >
> > Right. This happens also when the platform powers off the device.
> >
> > > Except using the runtime pm API to ensure the host is in
> > > a correct state, is there any other solution? AFAIK, 'dev->power.direct_complete'
> > > doesn't help such case.
> >
> > What I had in mind is something like below:
> >
> > static int i2c_dw_prepare(struct device *dev)
> > {
> > return pm_runtime_suspended(dev);
> > }
> >
> > static void i2c_dw_complete(struct device *dev)
> > {
> > if (dev->power.direct_complete)
> > pm_request_resume(dev);
> > }
> >
> > In other words it checks if the device is already runtime suspended and
> > prevents ->suspend() etc. from being called.
>
> What amazing! I wrote the same code as yours after sending out the last email.
Cool :)
> >
> > If that does not work (I didn't try as this problem does not exist on
>
> It works! How to submit the patch? Do you mind if I cook the patch and add
> you signed-off?
That's fine and you don't need to add my SoB there. I'll test the patch
here on some our platforms to ensure it does not break anything and if
it turns out working you can have my Tested-by then.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists