Blame view

include/linux/pci-acpi.h 1.25 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
  /*
   * File		pci-acpi.h
   *
   * Copyright (C) 2004 Intel
   * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
   */
  
  #ifndef _PCI_ACPI_H_
  #define _PCI_ACPI_H_
8b62091e2   Andrew Patterson   ACPI/PCI: include...
10
  #include <linux/acpi.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
11
  #ifdef CONFIG_ACPI
b67ea7617   Rafael J. Wysocki   PCI / ACPI / PM: ...
12
13
14
15
16
17
  extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev,
  						 struct pci_bus *pci_bus);
  extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev);
  extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
  					     struct pci_dev *pci_dev);
  extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev);
056c58e8e   Jiri Slaby   PCI: add acpi_fin...
18
19
  static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
  {
d18690af6   Kenji Kaneshige   PCI/ACPI: fix wro...
20
21
  	struct pci_bus *pbus = pdev->bus;
  	/* Find a PCI root bus */
a222b8f83   Kenji Kaneshige   PCI: use pci_is_r...
22
  	while (!pci_is_root_bus(pbus))
d18690af6   Kenji Kaneshige   PCI/ACPI: fix wro...
23
24
25
  		pbus = pbus->parent;
  	return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
  					      pbus->number);
056c58e8e   Jiri Slaby   PCI: add acpi_fin...
26
  }
e8c331e96   Kenji Kaneshige   PCI hotplug: intr...
27
28
29
  
  static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
  {
84845c070   Kenji Kaneshige   PCI: use pci_is_r...
30
  	if (!pci_is_root_bus(pbus))
0747aaf42   Kenji Kaneshige   PCI/ACPI: fix wro...
31
32
33
  		return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
  	return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
  					      pbus->number);
e8c331e96   Kenji Kaneshige   PCI hotplug: intr...
34
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
35
  #endif
415e12b23   Rafael J. Wysocki   PCI/ACPI: Request...
36
37
38
39
40
  #ifdef CONFIG_ACPI_APEI
  extern bool aer_acpi_firmware_first(void);
  #else
  static inline bool aer_acpi_firmware_first(void) { return false; }
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
41
  #endif	/* _PCI_ACPI_H_ */