aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2012-06-22 22:23:48 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-23 12:41:09 -0400
commitee85f543710dd56ce526cb44e39191f32972e5ad (patch)
tree13009358f0260d39c106b6708d6bb49f1d73279f /drivers/pnp
parentcfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff)
ACPI/PM: specify lowest allowed state for device sleep state
Lower device sleep state can save more power, but has more exit latency too. Sometimes, to satisfy some power QoS and other requirement, we need to constrain the lowest device sleep state. In this patch, a parameter to specify lowest allowed state for acpi_pm_device_sleep_state is added. So that the caller can enforce the constraint via the parameter. This is needed by PCIe D3cold support, where the lowest power state allowed may be D3_HOT instead of default D3_COLD. CC: Len Brown <lenb@kernel.org> CC: linux-acpi@vger.kernel.org Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/pnpacpi/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index d21e8f59c84e..507a8e2b9a4c 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -170,8 +170,8 @@ static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
170 } 170 }
171 171
172 if (acpi_bus_power_manageable(handle)) { 172 if (acpi_bus_power_manageable(handle)) {
173 int power_state = acpi_pm_device_sleep_state(&dev->dev, NULL); 173 int power_state = acpi_pm_device_sleep_state(&dev->dev, NULL,
174 174 ACPI_STATE_D3);
175 if (power_state < 0) 175 if (power_state < 0)
176 power_state = (state.event == PM_EVENT_ON) ? 176 power_state = (state.event == PM_EVENT_ON) ?
177 ACPI_STATE_D0 : ACPI_STATE_D3; 177 ACPI_STATE_D0 : ACPI_STATE_D3;