lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 8/8] mfd: Add support for Intel Sunrisepoint LPSS devices
    On Wed, May 27, 2015 at 11:22:41AM +0100, Lee Jones wrote:
    > > +static int resume_lpss_device(struct device *dev, void *data)
    > > +{
    > > + pm_runtime_resume(dev);
    > > + return 0;
    > > +}
    > > +
    > > +int intel_lpss_prepare(struct device *dev)
    > > +{
    > > + /*
    > > + * Resume both child devices before entering system sleep. This
    > > + * ensures that they are in proper state before they get suspended.
    > > + */
    > > + device_for_each_child_reverse(dev, NULL, resume_lpss_device);
    >
    > Why can't you do this in intel_lpss_suspend()?
    >
    > Then you can get rid of all the hand-rolled nonsense you have in the
    > header file and use SET_SYSTEM_SLEEP_PM_OPS instead.
    >
    > Does something happen after .prepare() and before .suspend() that
    > prevents this from working?

    At that time all children are already suspended (to system sleep) so we
    cannot bring them out of runtime suspend anymore.

    .prepare() is executed for all devices before suspend callbacks for
    each device.


    \
     
     \ /
      Last update: 2015-05-27 13:21    [W:4.047 / U:0.360 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site