Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Pavel Machek
On Thu 2013-12-05 17:21:50, Alan Stern wrote: > On Thu, 5 Dec 2013, Len Brown wrote: > > > This thread raises the question... > > > > Do we still need to have PM_RUNTIME apart from PM_SLEEP? > > > > What is the benefit of being able to build-in one one without the other? > > If that benefit is

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Alan Stern
On Thu, 5 Dec 2013, Len Brown wrote: > This thread raises the question... > > Do we still need to have PM_RUNTIME apart from PM_SLEEP? > > What is the benefit of being able to build-in one one without the other? > If that benefit is not significant, perhaps the time has come to > replace them

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Len Brown
This thread raises the question... Do we still need to have PM_RUNTIME apart from PM_SLEEP? What is the benefit of being able to build-in one one without the other? If that benefit is not significant, perhaps the time has come to replace them both with CONFIG_PM... cheers, -Len Brown, Intel

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Len Brown
This thread raises the question... Do we still need to have PM_RUNTIME apart from PM_SLEEP? What is the benefit of being able to build-in one one without the other? If that benefit is not significant, perhaps the time has come to replace them both with CONFIG_PM... cheers, -Len Brown, Intel

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Alan Stern
On Thu, 5 Dec 2013, Len Brown wrote: This thread raises the question... Do we still need to have PM_RUNTIME apart from PM_SLEEP? What is the benefit of being able to build-in one one without the other? If that benefit is not significant, perhaps the time has come to replace them both

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-05 Thread Pavel Machek
On Thu 2013-12-05 17:21:50, Alan Stern wrote: On Thu, 5 Dec 2013, Len Brown wrote: This thread raises the question... Do we still need to have PM_RUNTIME apart from PM_SLEEP? What is the benefit of being able to build-in one one without the other? If that benefit is not

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-02 Thread Ulf Hansson
> > That would be kind of OK, if the driver's .suspend_late() only invoked its own > .runtime_suspend(), what you did below. > > But, in the Ulf's approach the driver calls .runtime_suspend() from > its *subsystem* in the hope that it will all work out properly (or > perhaps based on the knowledge

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-02 Thread Ulf Hansson
> > Well, to be honest, I'd never put a call to pm_runtime_get_sync() into > a driver's system suspend callback. Nevertheless, the PM core allows it to happen and there are not only subsystem-level code but also drivers that use it, for whatever reasons. > > Subsystem callbacks are a different

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-02 Thread Ulf Hansson
Well, to be honest, I'd never put a call to pm_runtime_get_sync() into a driver's system suspend callback. Nevertheless, the PM core allows it to happen and there are not only subsystem-level code but also drivers that use it, for whatever reasons. Subsystem callbacks are a different matter

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-12-02 Thread Ulf Hansson
That would be kind of OK, if the driver's .suspend_late() only invoked its own .runtime_suspend(), what you did below. But, in the Ulf's approach the driver calls .runtime_suspend() from its *subsystem* in the hope that it will all work out properly (or perhaps based on the knowledge about

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 10:30:57 AM Alan Stern wrote: > On Fri, 29 Nov 2013, Rafael J. Wysocki wrote: > > > That should have been > > > > driver->runtime_suspend(dev) > > do_X(dev) > > > > because do_Y(dev) is for runtime suspend. Sorry. > > > > And of course, the subsystem-level

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Alan Stern
On Fri, 29 Nov 2013, Rafael J. Wysocki wrote: > That should have been > > driver->runtime_suspend(dev) > do_X(dev) > > because do_Y(dev) is for runtime suspend. Sorry. > > And of course, the subsystem-level code you're developing the driver for may > not > do the do_X(dev) thing

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 02:52:20 PM Rafael J. Wysocki wrote: > On Friday, November 29, 2013 10:32:06 AM Ulf Hansson wrote: [...] > > For the same reasons, I believe we should trust drivers/subsystems, to > > understand when it makes sense for them to re-use all of the runtime > > PM

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 10:32:06 AM Ulf Hansson wrote: > > > > The lack of specificity here doesn't make the discussion any easier. > > > > It usually is better to talk about specific problems to address than > > using general terms which may mean slightly different things for different > >

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Ulf Hansson
On 29 November 2013 10:32, Ulf Hansson wrote: >> >> The lack of specificity here doesn't make the discussion any easier. >> >> It usually is better to talk about specific problems to address than >> using general terms which may mean slightly different things for different >> people. > > During

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Ulf Hansson
> > The lack of specificity here doesn't make the discussion any easier. > > It usually is better to talk about specific problems to address than > using general terms which may mean slightly different things for different > people. During these discussions, I have tried to point at existing code

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Ulf Hansson
The lack of specificity here doesn't make the discussion any easier. It usually is better to talk about specific problems to address than using general terms which may mean slightly different things for different people. During these discussions, I have tried to point at existing code for

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Ulf Hansson
On 29 November 2013 10:32, Ulf Hansson ulf.hans...@linaro.org wrote: The lack of specificity here doesn't make the discussion any easier. It usually is better to talk about specific problems to address than using general terms which may mean slightly different things for different people.

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 10:32:06 AM Ulf Hansson wrote: The lack of specificity here doesn't make the discussion any easier. It usually is better to talk about specific problems to address than using general terms which may mean slightly different things for different people.

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 02:52:20 PM Rafael J. Wysocki wrote: On Friday, November 29, 2013 10:32:06 AM Ulf Hansson wrote: [...] For the same reasons, I believe we should trust drivers/subsystems, to understand when it makes sense for them to re-use all of the runtime PM callbacks

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Alan Stern
On Fri, 29 Nov 2013, Rafael J. Wysocki wrote: That should have been driver-runtime_suspend(dev) do_X(dev) because do_Y(dev) is for runtime suspend. Sorry. And of course, the subsystem-level code you're developing the driver for may not do the do_X(dev) thing at all, in

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-29 Thread Rafael J. Wysocki
On Friday, November 29, 2013 10:30:57 AM Alan Stern wrote: On Fri, 29 Nov 2013, Rafael J. Wysocki wrote: That should have been driver-runtime_suspend(dev) do_X(dev) because do_Y(dev) is for runtime suspend. Sorry. And of course, the subsystem-level code you're

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-28 Thread Rafael J. Wysocki
On Thursday, November 28, 2013 10:58:48 AM Ulf Hansson wrote: > On 27 November 2013 21:42, Rafael J. Wysocki wrote: > > On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: > >> To put devices into low power state during system suspend, it may be > >> convenient > >> for runtime PM

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-28 Thread Ulf Hansson
On 27 November 2013 21:42, Rafael J. Wysocki wrote: > On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: >> To put devices into low power state during system suspend, it may be >> convenient >> for runtime PM supported subsystems, power domains and drivers to have the >> option of

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-28 Thread Ulf Hansson
On 27 November 2013 21:42, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: To put devices into low power state during system suspend, it may be convenient for runtime PM supported subsystems, power domains and drivers to have the

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-28 Thread Rafael J. Wysocki
On Thursday, November 28, 2013 10:58:48 AM Ulf Hansson wrote: On 27 November 2013 21:42, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: To put devices into low power state during system suspend, it may be convenient for runtime

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-27 Thread Rafael J. Wysocki
On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: > To put devices into low power state during system suspend, it may be > convenient > for runtime PM supported subsystems, power domains and drivers to have the > option of re-using the runtime PM callbacks. > > At the moment, quite

[PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-27 Thread Ulf Hansson
To put devices into low power state during system suspend, it may be convenient for runtime PM supported subsystems, power domains and drivers to have the option of re-using the runtime PM callbacks. At the moment, quite complex solutions exist for power domains that tries to handle the above,

[PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-27 Thread Ulf Hansson
To put devices into low power state during system suspend, it may be convenient for runtime PM supported subsystems, power domains and drivers to have the option of re-using the runtime PM callbacks. At the moment, quite complex solutions exist for power domains that tries to handle the above,

Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend

2013-11-27 Thread Rafael J. Wysocki
On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote: To put devices into low power state during system suspend, it may be convenient for runtime PM supported subsystems, power domains and drivers to have the option of re-using the runtime PM callbacks. At the moment, quite