On Fri, Sep 14, 2018 at 8:49 AM Daniel Drake <drake@xxxxxxxxxxxx> wrote: > > On Tue, Sep 11, 2018 at 3:53 PM, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote: > > On a second thought, it may be better to use mem_sleep_default here. > > It looks like mem_sleep_default will ordinarily be PM_SUSPEND_MAX on a > s2idle system. > > The acpi/sleep.c code that deals with the lps0 device just does this: > > /* > * Use suspend-to-idle by default if the default > * suspend mode was not set from the command line. > */ > if (mem_sleep_default > PM_SUSPEND_MEM) > mem_sleep_current = PM_SUSPEND_TO_IDLE; Right, sorry. > > And you need to provide an empty stub for it for !CONFIG_SUSPEND. > > > > It may be even better to have a wrapper function around it, something > > like pm_default_s2idle() maybe? > > A wrapper sounds good. Would you prefer that to be introduced in a > separate patch, or should I roll it into this patch? I think it can go into this patch. After all it is needed because of the other changes here. Thanks, Rafael