diff options
author | David Shaohua Li <shaohua.li@intel.com> | 2005-03-19 00:16:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-11 23:47:06 -0400 |
commit | b913100d7304ea9596d8d85ab5f3ae04bd2b0ddb (patch) | |
tree | 270925a02dd83264fd5bd3a47fc39453798c39d5 /drivers/pci/pci.c | |
parent | 0f64474b8f7f1f7f3af5b24ef997baa35f923509 (diff) |
[ACPI] pci_set_power_state() now calls
platform_pci_set_power_state()
and ACPI can answer
http://bugzilla.kernel.org/show_bug.cgi?id=4277
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5af941807785..a1c66e8ea5f2 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -235,7 +235,7 @@ pci_find_parent_resource(const struct pci_dev *dev, struct resource *res) | |||
235 | * -EIO if device does not support PCI PM. | 235 | * -EIO if device does not support PCI PM. |
236 | * 0 if we can successfully change the power state. | 236 | * 0 if we can successfully change the power state. |
237 | */ | 237 | */ |
238 | 238 | int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t) = NULL; | |
239 | int | 239 | int |
240 | pci_set_power_state(struct pci_dev *dev, pci_power_t state) | 240 | pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
241 | { | 241 | { |
@@ -299,8 +299,15 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
299 | msleep(10); | 299 | msleep(10); |
300 | else if (state == PCI_D2 || dev->current_state == PCI_D2) | 300 | else if (state == PCI_D2 || dev->current_state == PCI_D2) |
301 | udelay(200); | 301 | udelay(200); |
302 | dev->current_state = state; | ||
303 | 302 | ||
303 | /* | ||
304 | * Give firmware a chance to be called, such as ACPI _PRx, _PSx | ||
305 | * Firmware method after natice method ? | ||
306 | */ | ||
307 | if (platform_pci_set_power_state) | ||
308 | platform_pci_set_power_state(dev, state); | ||
309 | |||
310 | dev->current_state = state; | ||
304 | return 0; | 311 | return 0; |
305 | } | 312 | } |
306 | 313 | ||