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) * -EIO if device does not support PCI PM. * 0 if we can successfully change the power state. */ - +int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t) = NULL; int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { @@ -299,8 +299,15 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) msleep(10); else if (state == PCI_D2 || dev->current_state == PCI_D2) udelay(200); - dev->current_state = state; + /* + * Give firmware a chance to be called, such as ACPI _PRx, _PSx + * Firmware method after natice method ? + */ + if (platform_pci_set_power_state) + platform_pci_set_power_state(dev, state); + + dev->current_state = state; return 0; } |