• Rafael J. Wysocki's avatar
    PM / core: Add SMART_SUSPEND driver flag · 0eab11c9
    Rafael J. Wysocki authored
    Define and document a SMART_SUSPEND flag to instruct bus types and PM
    domains that the system suspend callbacks provided by the driver can
    cope with runtime-suspended devices, so from the driver's perspective
    it should be safe to leave devices in runtime suspend during system
    suspend.
    
    Setting that flag may also cause middle-layer code (bus types,
    PM domains etc.) to skip invocations of the ->suspend_late and
    ->suspend_noirq callbacks provided by the driver if the device
    is in runtime suspend at the beginning of the "late" phase of
    the system-wide suspend transition, in which case the driver's
    system-wide resume callbacks may be invoked back-to-back with
    its ->runtime_suspend callback, so the driver has to be able to
    cope with that too.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    0eab11c9
main.c 46.1 KB