Re: [PATCH v2] PM / Sleep: Add pm_generic functions to re-use runtime PM callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, November 26, 2013 10:48:56 AM Ulf Hansson wrote:
> On 26 November 2013 00:10, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:
> > On Monday, November 25, 2013 01:40:21 PM Ulf Hansson wrote:
> >> To put devices into low power state during sleep, it sometimes makes
> >> sense at subsystem-level to re-use device's runtime PM callbacks.
> >>
> >> The PM core will at device_suspend_late disable runtime PM, after that
> >> we can safely operate on these callbacks. At suspend_late the device
> >> will be put into low power state by invoking the device's
> >> runtime_suspend callback, unless the runtime status is already
> >> suspended. At resume_early the state is restored by invoking the
> >> device's runtime_resume callback. Soon after the PM core will re-enable
> >> runtime PM before returning from device_resume_early.
> >>
> >> The new pm_generic functions are named pm_generic_suspend_late_runtime
> >> and pm_generic_resume_early_runtime, they are supposed to be used in
> >> pairs.
> >
> > What happens if the subsystem uses the new functions as its late suspend/
> > early resume callbacks, but some of its drivers implement .suspend_late()
> > and .resume_early()?
> 
> Good point. Normally, I think the decision of using these callbacks
> should be taken at the lowest level, in other words in the driver.
> Otherwise the lowest layer of .suspend_late will be by-passed.

I'm not sure what's the point to add them, then.  If the driver has to decide
anyway, it may simply populate its .suspend_late and .resume_early pointers
I think.

Thanks!

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux