diff mbox series

[v4,2/3] PM / mfd: intel-lpss: Push system sleep callbacks to late/early stages

Message ID 4332008.kXBLY0K23i@aspire.rjw.lan
State Accepted
Headers show
Series i2c: designware: Runtime PM aware system sleep handling | expand

Commit Message

Rafael J. Wysocki Sept. 24, 2017, 11:20 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Push the system suspend/resume callbacks of intel-lpss to the late
suspend/early resume stages to allow child device callbacks to be
pushed to the late/early stages of suspend/resume too, so as to
make it possible to avoid resuming the children if they are runtime-
suspended during system suspend going forward.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Johannes Stezenbach <js@sig21.net>
Tested-by: Rajat Jain <rajatja@google.com>
---

v3 -> v4: Added Tested-by tags.

---
 drivers/mfd/intel-lpss.h |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Wolfram Sang Sept. 25, 2017, 7:28 a.m. UTC | #1
On Mon, Sep 25, 2017 at 01:20:35AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Push the system suspend/resume callbacks of intel-lpss to the late
> suspend/early resume stages to allow child device callbacks to be
> pushed to the late/early stages of suspend/resume too, so as to
> make it possible to avoid resuming the children if they are runtime-
> suspended during system suspend going forward.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Tested-by: Johannes Stezenbach <js@sig21.net>
> Tested-by: Rajat Jain <rajatja@google.com>

If this series shall go in via I2C, I'd need an ack from Lee for this
one. Also, I'd assume this should go in for v4.14 already?

> ---
> 
> v3 -> v4: Added Tested-by tags.
> 
> ---
>  drivers/mfd/intel-lpss.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> Index: linux-pm/drivers/mfd/intel-lpss.h
> ===================================================================
> --- linux-pm.orig/drivers/mfd/intel-lpss.h
> +++ linux-pm/drivers/mfd/intel-lpss.h
> @@ -38,12 +38,7 @@ int intel_lpss_resume(struct device *dev
>  #ifdef CONFIG_PM_SLEEP
>  #define INTEL_LPSS_SLEEP_PM_OPS			\
>  	.prepare = intel_lpss_prepare,		\
> -	.suspend = intel_lpss_suspend,		\
> -	.resume = intel_lpss_resume,		\
> -	.freeze = intel_lpss_suspend,		\
> -	.thaw = intel_lpss_resume,		\
> -	.poweroff = intel_lpss_suspend,		\
> -	.restore = intel_lpss_resume,
> +	SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)
>  #else
>  #define INTEL_LPSS_SLEEP_PM_OPS
>  #endif
> 
>
Rafael J. Wysocki Sept. 25, 2017, 12:50 p.m. UTC | #2
On Monday, September 25, 2017 9:28:47 AM CEST Wolfram Sang wrote:
> On Mon, Sep 25, 2017 at 01:20:35AM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Push the system suspend/resume callbacks of intel-lpss to the late
> > suspend/early resume stages to allow child device callbacks to be
> > pushed to the late/early stages of suspend/resume too, so as to
> > make it possible to avoid resuming the children if they are runtime-
> > suspended during system suspend going forward.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> > Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Tested-by: Johannes Stezenbach <js@sig21.net>
> > Tested-by: Rajat Jain <rajatja@google.com>
> 
> If this series shall go in via I2C, I'd need an ack from Lee for this
> one.

Sure.

> Also, I'd assume this should go in for v4.14 already?

Well, it may be slightly late for that.  Realistically, the earliest -rc it
can get into seems to be -rc4 and I'd prefer it to get a bit more exposure
before it gets into a release.  It's up to you, though. :-)

Thanks,
Rafael
Wolfram Sang Sept. 25, 2017, 2:24 p.m. UTC | #3
> Well, it may be slightly late for that.  Realistically, the earliest -rc it
> can get into seems to be -rc4 and I'd prefer it to get a bit more exposure
> before it gets into a release.  It's up to you, though. :-)

Fine with me, I'll schedule it for v4.15 then.
Lee Jones Sept. 28, 2017, 7:19 p.m. UTC | #4
On Mon, 25 Sep 2017, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Push the system suspend/resume callbacks of intel-lpss to the late
> suspend/early resume stages to allow child device callbacks to be
> pushed to the late/early stages of suspend/resume too, so as to
> make it possible to avoid resuming the children if they are runtime-
> suspended during system suspend going forward.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Tested-by: Johannes Stezenbach <js@sig21.net>
> Tested-by: Rajat Jain <rajatja@google.com>
> ---
> 
> v3 -> v4: Added Tested-by tags.
> 
> ---
>  drivers/mfd/intel-lpss.h |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> Index: linux-pm/drivers/mfd/intel-lpss.h
> ===================================================================
> --- linux-pm.orig/drivers/mfd/intel-lpss.h
> +++ linux-pm/drivers/mfd/intel-lpss.h

Weird.  What format is this?

Don't you use `git format-patch` and `git send-email`?

> @@ -38,12 +38,7 @@ int intel_lpss_resume(struct device *dev
>  #ifdef CONFIG_PM_SLEEP
>  #define INTEL_LPSS_SLEEP_PM_OPS			\
>  	.prepare = intel_lpss_prepare,		\
> -	.suspend = intel_lpss_suspend,		\
> -	.resume = intel_lpss_resume,		\
> -	.freeze = intel_lpss_suspend,		\
> -	.thaw = intel_lpss_resume,		\
> -	.poweroff = intel_lpss_suspend,		\
> -	.restore = intel_lpss_resume,
> +	SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)

For the diff:

Acked-by: Lee Jones <lee.jones@linaro.org>
Rafael J. Wysocki Sept. 28, 2017, 8:51 p.m. UTC | #5
On Thursday, September 28, 2017 9:19:09 PM CEST Lee Jones wrote:
> On Mon, 25 Sep 2017, Rafael J. Wysocki wrote:
> 
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Push the system suspend/resume callbacks of intel-lpss to the late
> > suspend/early resume stages to allow child device callbacks to be
> > pushed to the late/early stages of suspend/resume too, so as to
> > make it possible to avoid resuming the children if they are runtime-
> > suspended during system suspend going forward.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> > Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Tested-by: Johannes Stezenbach <js@sig21.net>
> > Tested-by: Rajat Jain <rajatja@google.com>
> > ---
> > 
> > v3 -> v4: Added Tested-by tags.
> > 
> > ---
> >  drivers/mfd/intel-lpss.h |    7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> > Index: linux-pm/drivers/mfd/intel-lpss.h
> > ===================================================================
> > --- linux-pm.orig/drivers/mfd/intel-lpss.h
> > +++ linux-pm/drivers/mfd/intel-lpss.h
> 
> Weird.  What format is this?
> 
> Don't you use `git format-patch` and `git send-email`?

No, I don't.

I'm an old-timer, I use quilt. :-)

> > @@ -38,12 +38,7 @@ int intel_lpss_resume(struct device *dev
> >  #ifdef CONFIG_PM_SLEEP
> >  #define INTEL_LPSS_SLEEP_PM_OPS			\
> >  	.prepare = intel_lpss_prepare,		\
> > -	.suspend = intel_lpss_suspend,		\
> > -	.resume = intel_lpss_resume,		\
> > -	.freeze = intel_lpss_suspend,		\
> > -	.thaw = intel_lpss_resume,		\
> > -	.poweroff = intel_lpss_suspend,		\
> > -	.restore = intel_lpss_resume,
> > +	SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)
> 
> For the diff:
> 
> Acked-by: Lee Jones <lee.jones@linaro.org>

Thank you!
Rafael J. Wysocki Oct. 2, 2017, 11:58 p.m. UTC | #6
On Mon, Sep 25, 2017 at 9:28 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Mon, Sep 25, 2017 at 01:20:35AM +0200, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Push the system suspend/resume callbacks of intel-lpss to the late
>> suspend/early resume stages to allow child device callbacks to be
>> pushed to the late/early stages of suspend/resume too, so as to
>> make it possible to avoid resuming the children if they are runtime-
>> suspended during system suspend going forward.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
>> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>> Tested-by: Johannes Stezenbach <js@sig21.net>
>> Tested-by: Rajat Jain <rajatja@google.com>
>
> If this series shall go in via I2C, I'd need an ack from Lee for this
> one.

So this one has been ACKed now, so the series should be good to go.

Do you need me to resend it (because of the v5 of patch [1/3])?

Thanks,
Rafael
Wolfram Sang Oct. 5, 2017, 11 a.m. UTC | #7
On Mon, Sep 25, 2017 at 01:20:35AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Push the system suspend/resume callbacks of intel-lpss to the late
> suspend/early resume stages to allow child device callbacks to be
> pushed to the late/early stages of suspend/resume too, so as to
> make it possible to avoid resuming the children if they are runtime-
> suspended during system suspend going forward.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Tested-by: Johannes Stezenbach <js@sig21.net>
> Tested-by: Rajat Jain <rajatja@google.com>

Applied to for-next, thanks!
diff mbox series

Patch

Index: linux-pm/drivers/mfd/intel-lpss.h
===================================================================
--- linux-pm.orig/drivers/mfd/intel-lpss.h
+++ linux-pm/drivers/mfd/intel-lpss.h
@@ -38,12 +38,7 @@  int intel_lpss_resume(struct device *dev
 #ifdef CONFIG_PM_SLEEP
 #define INTEL_LPSS_SLEEP_PM_OPS			\
 	.prepare = intel_lpss_prepare,		\
-	.suspend = intel_lpss_suspend,		\
-	.resume = intel_lpss_resume,		\
-	.freeze = intel_lpss_suspend,		\
-	.thaw = intel_lpss_resume,		\
-	.poweroff = intel_lpss_suspend,		\
-	.restore = intel_lpss_resume,
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume)
 #else
 #define INTEL_LPSS_SLEEP_PM_OPS
 #endif