aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-02-17 17:44:58 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 19:21:19 -0500
commit6cbf82148ff286ec22a55be6836c3a5bffc489c1 (patch)
tree77b1b0097f9c2389d56734ec4c022611aa1bd9db /include/linux/pci.h
parent552be54cc4232dc5acc49ccb372129d6f1b6923f (diff)
PCI PM: Run-time callbacks for PCI bus type
Introduce run-time PM callbacks for the PCI bus type. Make the new callbacks work in analogy with the existing system sleep PM callbacks, so that the drivers already converted to struct dev_pm_ops can use their suspend and resume routines for run-time PM without modifications. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3f787ce78bd1..1a29f9f6b2dc 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -777,13 +777,20 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
777pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 777pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
778bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 778bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
779void pci_pme_active(struct pci_dev *dev, bool enable); 779void pci_pme_active(struct pci_dev *dev, bool enable);
780int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); 780int __pci_enable_wake(struct pci_dev *dev, pci_power_t state,
781 bool runtime, bool enable);
781int pci_wake_from_d3(struct pci_dev *dev, bool enable); 782int pci_wake_from_d3(struct pci_dev *dev, bool enable);
782pci_power_t pci_target_state(struct pci_dev *dev); 783pci_power_t pci_target_state(struct pci_dev *dev);
783int pci_prepare_to_sleep(struct pci_dev *dev); 784int pci_prepare_to_sleep(struct pci_dev *dev);
784int pci_back_from_sleep(struct pci_dev *dev); 785int pci_back_from_sleep(struct pci_dev *dev);
785bool pci_dev_run_wake(struct pci_dev *dev); 786bool pci_dev_run_wake(struct pci_dev *dev);
786 787
788static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
789 bool enable)
790{
791 return __pci_enable_wake(dev, state, false, enable);
792}
793
787/* For use by arch with custom probe code */ 794/* For use by arch with custom probe code */
788void set_pcie_port_type(struct pci_dev *pdev); 795void set_pcie_port_type(struct pci_dev *pdev);
789void set_pcie_hotplug_bridge(struct pci_dev *pdev); 796void set_pcie_hotplug_bridge(struct pci_dev *pdev);