]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Jul 2019 10:54:29 +0000 (12:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Jul 2019 22:13:24 +0000 (00:13 +0200)
commit27466e58e3e42dcf7dc6917679410ac5447996b1
treef94c10c0c704e8b847389127f90d93e6887d97d2
parent280031db53ec2aafcbeac9de5e6fc7a99def89fe
ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS

In general, it is not correct to call pm_generic_suspend(),
pm_generic_suspend_late() and pm_generic_suspend_noirq() during the
hibernation's "poweroff" transition, because device drivers may
provide special callbacks to be invoked then and the wrappers in
question cause system suspend callbacks to be run.  Unfortunately,
that happens in the ACPI PM domain and ACPI LPSS.

To address this potential issue, introduce "poweroff" callbacks
for the ACPI PM and LPSS that will use pm_generic_poweroff(),
pm_generic_poweroff_late() and pm_generic_poweroff_noirq() as
appropriate.

Fixes: 05beebf68085 (ACPI / PM: Take SMART_SUSPEND driver flag into account)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/acpi/acpi_lpss.c
drivers/acpi/device_pm.c
include/linux/acpi.h