diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-02-17 17:44:58 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-02-22 19:21:19 -0500 |
commit | 6cbf82148ff286ec22a55be6836c3a5bffc489c1 (patch) | |
tree | 77b1b0097f9c2389d56734ec4c022611aa1bd9db /include/linux/pci.h | |
parent | 552be54cc4232dc5acc49ccb372129d6f1b6923f (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.h | 9 |
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); | |||
777 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 777 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
778 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 778 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
779 | void pci_pme_active(struct pci_dev *dev, bool enable); | 779 | void pci_pme_active(struct pci_dev *dev, bool enable); |
780 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); | 780 | int __pci_enable_wake(struct pci_dev *dev, pci_power_t state, |
781 | bool runtime, bool enable); | ||
781 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 782 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
782 | pci_power_t pci_target_state(struct pci_dev *dev); | 783 | pci_power_t pci_target_state(struct pci_dev *dev); |
783 | int pci_prepare_to_sleep(struct pci_dev *dev); | 784 | int pci_prepare_to_sleep(struct pci_dev *dev); |
784 | int pci_back_from_sleep(struct pci_dev *dev); | 785 | int pci_back_from_sleep(struct pci_dev *dev); |
785 | bool pci_dev_run_wake(struct pci_dev *dev); | 786 | bool pci_dev_run_wake(struct pci_dev *dev); |
786 | 787 | ||
788 | static 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 */ |
788 | void set_pcie_port_type(struct pci_dev *pdev); | 795 | void set_pcie_port_type(struct pci_dev *pdev); |
789 | void set_pcie_hotplug_bridge(struct pci_dev *pdev); | 796 | void set_pcie_hotplug_bridge(struct pci_dev *pdev); |