diff options
| -rw-r--r-- | drivers/pci/pci.c | 16 | ||||
| -rw-r--r-- | drivers/pci/pci.h | 6 | ||||
| -rw-r--r-- | include/linux/pci.h | 1 |
3 files changed, 6 insertions, 17 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 6762dcae90ab..bf7ad2c09955 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -1297,22 +1297,6 @@ bool pci_check_pme_status(struct pci_dev *dev) | |||
| 1297 | return ret; | 1297 | return ret; |
| 1298 | } | 1298 | } |
| 1299 | 1299 | ||
| 1300 | /* | ||
| 1301 | * Time to wait before the system can be put into a sleep state after reporting | ||
| 1302 | * a wakeup event signaled by a PCI device. | ||
| 1303 | */ | ||
| 1304 | #define PCI_WAKEUP_COOLDOWN 100 | ||
| 1305 | |||
| 1306 | /** | ||
| 1307 | * pci_wakeup_event - Report a wakeup event related to a given PCI device. | ||
| 1308 | * @dev: Device to report the wakeup event for. | ||
| 1309 | */ | ||
| 1310 | void pci_wakeup_event(struct pci_dev *dev) | ||
| 1311 | { | ||
| 1312 | if (device_may_wakeup(&dev->dev)) | ||
| 1313 | pm_wakeup_event(&dev->dev, PCI_WAKEUP_COOLDOWN); | ||
| 1314 | } | ||
| 1315 | |||
| 1316 | /** | 1300 | /** |
| 1317 | * pci_pme_wakeup - Wake up a PCI device if its PME Status bit is set. | 1301 | * pci_pme_wakeup - Wake up a PCI device if its PME Status bit is set. |
| 1318 | * @dev: Device to handle. | 1302 | * @dev: Device to handle. |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 16ae9659346b..f69d6e0fda75 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
| @@ -74,6 +74,12 @@ extern void pci_pm_init(struct pci_dev *dev); | |||
| 74 | extern void platform_pci_wakeup_init(struct pci_dev *dev); | 74 | extern void platform_pci_wakeup_init(struct pci_dev *dev); |
| 75 | extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); | 75 | extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); |
| 76 | 76 | ||
| 77 | static inline void pci_wakeup_event(struct pci_dev *dev) | ||
| 78 | { | ||
| 79 | /* Wait 100 ms before the system can be put into a sleep state. */ | ||
| 80 | pm_wakeup_event(&dev->dev, 100); | ||
| 81 | } | ||
| 82 | |||
| 77 | static inline bool pci_is_bridge(struct pci_dev *pci_dev) | 83 | static inline bool pci_is_bridge(struct pci_dev *pci_dev) |
| 78 | { | 84 | { |
| 79 | return !!(pci_dev->subordinate); | 85 | return !!(pci_dev->subordinate); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 12dd86a82a15..9e67dcd054c4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -820,7 +820,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev); | |||
| 820 | int pci_back_from_sleep(struct pci_dev *dev); | 820 | int pci_back_from_sleep(struct pci_dev *dev); |
| 821 | bool pci_dev_run_wake(struct pci_dev *dev); | 821 | bool pci_dev_run_wake(struct pci_dev *dev); |
| 822 | bool pci_check_pme_status(struct pci_dev *dev); | 822 | bool pci_check_pme_status(struct pci_dev *dev); |
| 823 | void pci_wakeup_event(struct pci_dev *dev); | ||
| 824 | void pci_pme_wakeup_bus(struct pci_bus *bus); | 823 | void pci_pme_wakeup_bus(struct pci_bus *bus); |
| 825 | 824 | ||
| 826 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, | 825 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, |
