• Rafael J. Wysocki's avatar
    Suspend: Introduce begin() and end() callbacks · c697eece
    Rafael J. Wysocki authored
    On ACPI systems the target state set by acpi_pm_set_target() is
    reset by acpi_pm_finish(), but that need not be called if the
    suspend fails.  All platforms that use the .set_target() global
    suspend callback are affected by analogous issues.
    
    For this reason, we need an additional global suspend callback that
    will reset the target state regardless of whether or not the suspend
    is successful.  Also, it is reasonable to rename the .set_target()
    callback, since it will be used for a different purpose on ACPI
    systems (due to ACPI 1.0x code ordering requirements).
    
    Introduce the global suspend callback .end() to be executed at the
    end of the suspend sequence and rename the .set_target() global
    suspend callback to .begin().
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    c697eece
lite5200_pm.c 5.94 KB