acpi_drivers.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * acpi_drivers.h ($Revision: 31 $)
  4. *
  5. * Copyright (C) 2001, 2002 Andy Grover <[email protected]>
  6. * Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>
  7. */
  8. #ifndef __ACPI_DRIVERS_H__
  9. #define __ACPI_DRIVERS_H__
  10. #define ACPI_MAX_STRING 80
  11. /*
  12. * _HID definitions
  13. * HIDs must conform to ACPI spec(6.1.4)
  14. * Linux specific HIDs do not apply to this and begin with LNX:
  15. */
  16. #define ACPI_POWER_HID "LNXPOWER"
  17. #define ACPI_PROCESSOR_OBJECT_HID "LNXCPU"
  18. #define ACPI_SYSTEM_HID "LNXSYSTM"
  19. #define ACPI_THERMAL_HID "LNXTHERM"
  20. #define ACPI_BUTTON_HID_POWERF "LNXPWRBN"
  21. #define ACPI_BUTTON_HID_SLEEPF "LNXSLPBN"
  22. #define ACPI_VIDEO_HID "LNXVIDEO"
  23. #define ACPI_BAY_HID "LNXIOBAY"
  24. #define ACPI_DOCK_HID "LNXDOCK"
  25. #define ACPI_ECDT_HID "LNXEC"
  26. /* Quirk for broken IBM BIOSes */
  27. #define ACPI_SMBUS_IBM_HID "SMBUSIBM"
  28. /*
  29. * For fixed hardware buttons, we fabricate acpi_devices with HID
  30. * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF. Fixed hardware
  31. * signals only an event; it doesn't supply a notification value.
  32. * To allow drivers to treat notifications from fixed hardware the
  33. * same as those from real devices, we turn the events into this
  34. * notification value.
  35. */
  36. #define ACPI_FIXED_HARDWARE_EVENT 0x100
  37. /* --------------------------------------------------------------------------
  38. PCI
  39. -------------------------------------------------------------------------- */
  40. /* ACPI PCI Interrupt Link */
  41. int acpi_irq_penalty_init(void);
  42. int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
  43. int *polarity, char **name);
  44. int acpi_pci_link_free_irq(acpi_handle handle);
  45. /* ACPI PCI Device Binding */
  46. struct pci_bus;
  47. #ifdef CONFIG_PCI
  48. struct pci_dev *acpi_get_pci_dev(acpi_handle);
  49. #else
  50. static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
  51. {
  52. return NULL;
  53. }
  54. #endif
  55. /* Arch-defined function to add a bus to the system */
  56. struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
  57. #ifdef CONFIG_X86
  58. void pci_acpi_crs_quirks(void);
  59. #else
  60. static inline void pci_acpi_crs_quirks(void) { }
  61. #endif
  62. /*--------------------------------------------------------------------------
  63. Dock Station
  64. -------------------------------------------------------------------------- */
  65. #ifdef CONFIG_ACPI_DOCK
  66. extern int is_dock_device(struct acpi_device *adev);
  67. #else
  68. static inline int is_dock_device(struct acpi_device *adev)
  69. {
  70. return 0;
  71. }
  72. #endif /* CONFIG_ACPI_DOCK */
  73. #endif /*__ACPI_DRIVERS_H__*/