summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-07 00:49:34 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-14 02:17:33 +0200
commitef25ba0476015908ef5960f9faac149ddf34ede0 (patch)
tree00f955d56fc042f68954edaffd456dfe4ce26ad4 /drivers/acpi/sleep.c
parentc2df86ea924a8548f54ce90e46fdd6c9495119b2 (diff)
downloadop-kernel-dev-ef25ba0476015908ef5960f9faac149ddf34ede0.zip
op-kernel-dev-ef25ba0476015908ef5960f9faac149ddf34ede0.tar.gz
PM / sleep: Add flags to indicate platform firmware involvement
There are quite a few cases in which device drivers, bus types or even the PM core itself may benefit from knowing whether or not the platform firmware will be involved in the upcoming system power transition (during system suspend) or whether or not it was involved in it (during system resume). For this reason, introduce global system suspend flags that can be used by the platform code to expose that information for the benefit of the other parts of the kernel and make the ACPI core set them as appropriate. Users of the new flags will be added later. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2f0d4db..a0b4d781 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -487,6 +487,8 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
pr_err("ACPI does not support sleep state S%u\n", acpi_state);
return -ENOSYS;
}
+ if (acpi_state > ACPI_STATE_S1)
+ pm_set_suspend_via_firmware();
acpi_pm_start(acpi_state);
return 0;
@@ -522,6 +524,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
if (error)
return error;
pr_info(PREFIX "Low-level resume complete\n");
+ pm_set_resume_via_firmware();
break;
}
trace_suspend_resume(TPS("acpi_suspend"), acpi_state, false);
OpenPOWER on IntegriCloud