Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127387
b: refs/heads/master
c: eb9c39d
h: refs/heads/master
i:
  127385: cc02883
  127383: 22b6b0e
v: v3
  • Loading branch information
Jesse Barnes committed Jan 7, 2009
1 parent 282e0d5 commit 024fb57
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 876e501ab25dcd683574a5d3d56d8fe450083ed6
refs/heads/master: eb9c39d031bbcfd4005bd7e0337c3fd3909c1bf7
20 changes: 20 additions & 0 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,26 @@ void pci_pm_init(struct pci_dev *dev)
}
}

/**
* platform_pci_wakeup_init - init platform wakeup if present
* @dev: PCI device
*
* Some devices don't have PCI PM caps but can still generate wakeup
* events through platform methods (like ACPI events). If @dev supports
* platform wakeup events, set the device flag to indicate as much. This
* may be redundant if the device also supports PCI PM caps, but double
* initialization should be safe in that case.
*/
void platform_pci_wakeup_init(struct pci_dev *dev)
{
if (!platform_pci_can_wakeup(dev))
return;

device_set_wakeup_capable(&dev->dev, true);
device_set_wakeup_enable(&dev->dev, false);
platform_pci_sleep_wake(dev, false);
}

/**
* pci_add_save_buffer - allocate buffer for saving given capability registers
* @dev: the PCI device
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct pci_platform_pm_ops {

extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
extern void pci_pm_init(struct pci_dev *dev);
extern void platform_pci_wakeup_init(struct pci_dev *dev);
extern void pci_allocate_cap_save_buffers(struct pci_dev *dev);

extern int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ static void pci_init_capabilities(struct pci_dev *dev)

/* Power Management */
pci_pm_init(dev);
platform_pci_wakeup_init(dev);

/* Vital Product Data */
pci_vpd_pci22_init(dev);
Expand Down

0 comments on commit 024fb57

Please sign in to comment.