1c942fddfSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * acpi_drivers.h ($Revision: 31 $) 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> 61da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 71da177e4SLinus Torvalds */ 81da177e4SLinus Torvalds 91da177e4SLinus Torvalds #ifndef __ACPI_DRIVERS_H__ 101da177e4SLinus Torvalds #define __ACPI_DRIVERS_H__ 111da177e4SLinus Torvalds 121da177e4SLinus Torvalds #define ACPI_MAX_STRING 80 131da177e4SLinus Torvalds 14bdd72799SBjorn Helgaas /* 158c8eb78fSThomas Renninger * _HID definitions 168c8eb78fSThomas Renninger * HIDs must conform to ACPI spec(6.1.4) 178c8eb78fSThomas Renninger * Linux specific HIDs do not apply to this and begin with LNX: 188c8eb78fSThomas Renninger */ 191da177e4SLinus Torvalds 208c8eb78fSThomas Renninger #define ACPI_POWER_HID "LNXPOWER" 21b9417f84SBjorn Helgaas #define ACPI_PROCESSOR_OBJECT_HID "LNXCPU" 228c8eb78fSThomas Renninger #define ACPI_SYSTEM_HID "LNXSYSTM" 238c8eb78fSThomas Renninger #define ACPI_THERMAL_HID "LNXTHERM" 248c8eb78fSThomas Renninger #define ACPI_BUTTON_HID_POWERF "LNXPWRBN" 258c8eb78fSThomas Renninger #define ACPI_BUTTON_HID_SLEEPF "LNXSLPBN" 268c8eb78fSThomas Renninger #define ACPI_VIDEO_HID "LNXVIDEO" 278c8eb78fSThomas Renninger #define ACPI_BAY_HID "LNXIOBAY" 28a340af14SFrank Seidel #define ACPI_DOCK_HID "LNXDOCK" 29a64a62ceSLv Zheng #define ACPI_ECDT_HID "LNXEC" 30*bf6067a6SAndy Shevchenko /* SMBUS HID definition as supported by Microsoft Windows */ 31*bf6067a6SAndy Shevchenko #define ACPI_SMBUS_MS_HID "SMB0001" 32222e82acSDarrick J. Wong /* Quirk for broken IBM BIOSes */ 33222e82acSDarrick J. Wong #define ACPI_SMBUS_IBM_HID "SMBUSIBM" 348c8eb78fSThomas Renninger 3546ec8598SBjorn Helgaas /* 3646ec8598SBjorn Helgaas * For fixed hardware buttons, we fabricate acpi_devices with HID 3746ec8598SBjorn Helgaas * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF. Fixed hardware 3846ec8598SBjorn Helgaas * signals only an event; it doesn't supply a notification value. 3946ec8598SBjorn Helgaas * To allow drivers to treat notifications from fixed hardware the 4046ec8598SBjorn Helgaas * same as those from real devices, we turn the events into this 4146ec8598SBjorn Helgaas * notification value. 4246ec8598SBjorn Helgaas */ 4346ec8598SBjorn Helgaas #define ACPI_FIXED_HARDWARE_EVENT 0x100 4446ec8598SBjorn Helgaas 451da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 461da177e4SLinus Torvalds PCI 471da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 481da177e4SLinus Torvalds 491da177e4SLinus Torvalds 50ec2a9ceaSHanjun Guo /* ACPI PCI Interrupt Link */ 511da177e4SLinus Torvalds 521da177e4SLinus Torvalds int acpi_irq_penalty_init(void); 5350eca3ebSBob Moore int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, 5450eca3ebSBob Moore int *polarity, char **name); 5587bec66bSDavid Shaohua Li int acpi_pci_link_free_irq(acpi_handle handle); 561da177e4SLinus Torvalds 57ec2a9ceaSHanjun Guo /* ACPI PCI Device Binding */ 581da177e4SLinus Torvalds 591da177e4SLinus Torvalds struct pci_bus; 601da177e4SLinus Torvalds 615d32a665SSinan Kaya #ifdef CONFIG_PCI 622f7bbcebSAlexander Chiang struct pci_dev *acpi_get_pci_dev(acpi_handle); 635d32a665SSinan Kaya #else acpi_get_pci_dev(acpi_handle handle)645d32a665SSinan Kayastatic inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle) 655d32a665SSinan Kaya { 665d32a665SSinan Kaya return NULL; 675d32a665SSinan Kaya } 685d32a665SSinan Kaya #endif 691da177e4SLinus Torvalds 701da177e4SLinus Torvalds /* Arch-defined function to add a bus to the system */ 711da177e4SLinus Torvalds 7257283776SBjorn Helgaas struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root); 736b90f55fSHanjun Guo 746b90f55fSHanjun Guo #ifdef CONFIG_X86 757bc5e3f2SBjorn Helgaas void pci_acpi_crs_quirks(void); 766b90f55fSHanjun Guo #else pci_acpi_crs_quirks(void)776b90f55fSHanjun Guostatic inline void pci_acpi_crs_quirks(void) { } 786b90f55fSHanjun Guo #endif 791da177e4SLinus Torvalds 801da177e4SLinus Torvalds /*-------------------------------------------------------------------------- 81c8f7a62cSLen Brown Dock Station 82c8f7a62cSLen Brown -------------------------------------------------------------------------- */ 831253f7aaSShaohua Li 84e6c215f1SRafael J. Wysocki #ifdef CONFIG_ACPI_DOCK 853b52b21fSRafael J. Wysocki extern int is_dock_device(struct acpi_device *adev); 86c8f7a62cSLen Brown #else is_dock_device(struct acpi_device * adev)873b52b21fSRafael J. Wysockistatic inline int is_dock_device(struct acpi_device *adev) 88d94d3dffSAndrew Morton { 89d94d3dffSAndrew Morton return 0; 90d94d3dffSAndrew Morton } 91e6c215f1SRafael J. Wysocki #endif /* CONFIG_ACPI_DOCK */ 92aafbcd16SAlexey Starikovskiy 931da177e4SLinus Torvalds #endif /*__ACPI_DRIVERS_H__*/ 94