pci_enable_wake — enable PCI device as wakeup event source
int pci_enable_wake ( | struct pci_dev * | dev, |
pci_power_t | state, | |
int | enable) ; |
dev
PCI device affected
state
PCI state from which device will issue wakeup events
enable
True to enable event generation; false to disable
This enables the device as a wakeup event source, or disables it. When such events involves platform-specific hooks, those hooks are called automatically by this routine.
Devices with legacy power management (no standard PCI PM capabilities) always require such platform hooks. Depending on the platform, devices supporting the standard PCI PME# signal may require such platform hooks; they always update bits in config space to allow PME# generation.
-EIO is returned if the device can't ever be a wakeup event source. -EINVAL is returned if the device can't generate wakeup events from the specified PCI state. Returns zero if the operation is successful.