aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r--drivers/pci/pci.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index fbd0e3adbca3..4eb10f48d270 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -35,6 +35,10 @@ int pci_probe_reset_function(struct pci_dev *dev);
35 * 35 *
36 * @sleep_wake: enables/disables the system wake up capability of given device 36 * @sleep_wake: enables/disables the system wake up capability of given device
37 * 37 *
38 * @run_wake: enables/disables the platform to generate run-time wake-up events
39 * for given device (the device's wake-up capability has to be
40 * enabled by @sleep_wake for this feature to work)
41 *
38 * If given platform is generally capable of power managing PCI devices, all of 42 * If given platform is generally capable of power managing PCI devices, all of
39 * these callbacks are mandatory. 43 * these callbacks are mandatory.
40 */ 44 */
@@ -44,11 +48,16 @@ struct pci_platform_pm_ops {
44 pci_power_t (*choose_state)(struct pci_dev *dev); 48 pci_power_t (*choose_state)(struct pci_dev *dev);
45 bool (*can_wakeup)(struct pci_dev *dev); 49 bool (*can_wakeup)(struct pci_dev *dev);
46 int (*sleep_wake)(struct pci_dev *dev, bool enable); 50 int (*sleep_wake)(struct pci_dev *dev, bool enable);
51 int (*run_wake)(struct pci_dev *dev, bool enable);
47}; 52};
48 53
49extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops); 54extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
50extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state); 55extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
51extern void pci_disable_enabled_device(struct pci_dev *dev); 56extern void pci_disable_enabled_device(struct pci_dev *dev);
57extern bool pci_check_pme_status(struct pci_dev *dev);
58extern int pci_finish_runtime_suspend(struct pci_dev *dev);
59extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign);
60extern void pci_pme_wakeup_bus(struct pci_bus *bus);
52extern void pci_pm_init(struct pci_dev *dev); 61extern void pci_pm_init(struct pci_dev *dev);
53extern void platform_pci_wakeup_init(struct pci_dev *dev); 62extern void platform_pci_wakeup_init(struct pci_dev *dev);
54extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); 63extern void pci_allocate_cap_save_buffers(struct pci_dev *dev);
@@ -319,6 +328,13 @@ struct pci_dev_reset_methods {
319 int (*reset)(struct pci_dev *dev, int probe); 328 int (*reset)(struct pci_dev *dev, int probe);
320}; 329};
321 330
331#ifdef CONFIG_PCI_QUIRKS
322extern int pci_dev_specific_reset(struct pci_dev *dev, int probe); 332extern int pci_dev_specific_reset(struct pci_dev *dev, int probe);
333#else
334static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
335{
336 return -ENOTTY;
337}
338#endif
323 339
324#endif /* DRIVERS_PCI_H */ 340#endif /* DRIVERS_PCI_H */