aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2011-05-04 10:56:43 -0400
committerLen Brown <len.brown@intel.com>2011-05-29 02:21:08 -0400
commit28c2103dad04dba29ba86e22dad5735db8f0e13c (patch)
tree7bdd422ae53e4f48bdaa48e1d83e6c25a1ee56e4
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
ACPI: Add D3 cold state
_SxW returns an Integer containing the lowest D-state supported in state Sx. If OSPM has not indicated that it supports _PR3, then the value “3” corresponds to D3. If it has indicated _PR3 support, the value “3” represents D3hot and the value “4” represents D3cold. Linux does set _OSC._PR3, so we should fix it to expect that _SxW can return 4. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/bus.c2
-rw-r--r--drivers/pci/pci-acpi.c2
-rw-r--r--include/acpi/actypes.h5
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 9749980ca6ca..d1e06c182cdb 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -227,7 +227,7 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state)
227 acpi_status status = AE_OK; 227 acpi_status status = AE_OK;
228 char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' }; 228 char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' };
229 229
230 if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) 230 if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD))
231 return -EINVAL; 231 return -EINVAL;
232 232
233 /* Make sure this is a valid target state */ 233 /* Make sure this is a valid target state */
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 7c3b18e78cee..d36f41ea8cbf 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -195,6 +195,8 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
195 return PCI_D2; 195 return PCI_D2;
196 case ACPI_STATE_D3: 196 case ACPI_STATE_D3:
197 return PCI_D3hot; 197 return PCI_D3hot;
198 case ACPI_STATE_D3_COLD:
199 return PCI_D3cold;
198 } 200 }
199 return PCI_POWER_ERROR; 201 return PCI_POWER_ERROR;
200} 202}
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 64f838beaabf..f72cbe574296 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -501,8 +501,9 @@ typedef u64 acpi_integer;
501#define ACPI_STATE_D1 (u8) 1 501#define ACPI_STATE_D1 (u8) 1
502#define ACPI_STATE_D2 (u8) 2 502#define ACPI_STATE_D2 (u8) 2
503#define ACPI_STATE_D3 (u8) 3 503#define ACPI_STATE_D3 (u8) 3
504#define ACPI_D_STATES_MAX ACPI_STATE_D3 504#define ACPI_STATE_D3_COLD (u8) 4
505#define ACPI_D_STATE_COUNT 4 505#define ACPI_D_STATES_MAX ACPI_STATE_D3_COLD
506#define ACPI_D_STATE_COUNT 5
506 507
507#define ACPI_STATE_C0 (u8) 0 508#define ACPI_STATE_C0 (u8) 0
508#define ACPI_STATE_C1 (u8) 1 509#define ACPI_STATE_C1 (u8) 1