11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * acpi_drivers.h ($Revision: 31 $) 31da177e4SLinus Torvalds * 41da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> 51da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81da177e4SLinus Torvalds * 91da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 101da177e4SLinus Torvalds * it under the terms of the GNU General Public License as published by 111da177e4SLinus Torvalds * the Free Software Foundation; either version 2 of the License, or (at 121da177e4SLinus Torvalds * your option) any later version. 131da177e4SLinus Torvalds * 141da177e4SLinus Torvalds * This program is distributed in the hope that it will be useful, but 151da177e4SLinus Torvalds * WITHOUT ANY WARRANTY; without even the implied warranty of 161da177e4SLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 171da177e4SLinus Torvalds * General Public License for more details. 181da177e4SLinus Torvalds * 191da177e4SLinus Torvalds * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 201da177e4SLinus Torvalds */ 211da177e4SLinus Torvalds 221da177e4SLinus Torvalds #ifndef __ACPI_DRIVERS_H__ 231da177e4SLinus Torvalds #define __ACPI_DRIVERS_H__ 241da177e4SLinus Torvalds 251da177e4SLinus Torvalds #define ACPI_MAX_STRING 80 261da177e4SLinus Torvalds 27bdd72799SBjorn Helgaas /* 28bdd72799SBjorn Helgaas * Please update drivers/acpi/debug.c and Documentation/acpi/debug.txt 29bdd72799SBjorn Helgaas * if you add to this list. 30bdd72799SBjorn Helgaas */ 311da177e4SLinus Torvalds #define ACPI_BUS_COMPONENT 0x00010000 3289595b8fSBjorn Helgaas #define ACPI_AC_COMPONENT 0x00020000 3389595b8fSBjorn Helgaas #define ACPI_BATTERY_COMPONENT 0x00040000 3489595b8fSBjorn Helgaas #define ACPI_BUTTON_COMPONENT 0x00080000 3544342f9eSBjorn Helgaas #define ACPI_SBS_COMPONENT 0x00100000 3689595b8fSBjorn Helgaas #define ACPI_FAN_COMPONENT 0x00200000 3789595b8fSBjorn Helgaas #define ACPI_PCI_COMPONENT 0x00400000 3889595b8fSBjorn Helgaas #define ACPI_POWER_COMPONENT 0x00800000 3989595b8fSBjorn Helgaas #define ACPI_CONTAINER_COMPONENT 0x01000000 401da177e4SLinus Torvalds #define ACPI_SYSTEM_COMPONENT 0x02000000 4189595b8fSBjorn Helgaas #define ACPI_THERMAL_COMPONENT 0x04000000 4289595b8fSBjorn Helgaas #define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000 4344342f9eSBjorn Helgaas #define ACPI_VIDEO_COMPONENT 0x10000000 4444342f9eSBjorn Helgaas #define ACPI_PROCESSOR_COMPONENT 0x20000000 451da177e4SLinus Torvalds 468c8eb78fSThomas Renninger /* 478c8eb78fSThomas Renninger * _HID definitions 488c8eb78fSThomas Renninger * HIDs must conform to ACPI spec(6.1.4) 498c8eb78fSThomas Renninger * Linux specific HIDs do not apply to this and begin with LNX: 508c8eb78fSThomas Renninger */ 511da177e4SLinus Torvalds 528c8eb78fSThomas Renninger #define ACPI_POWER_HID "LNXPOWER" 53b9417f84SBjorn Helgaas #define ACPI_PROCESSOR_OBJECT_HID "LNXCPU" 548c8eb78fSThomas Renninger #define ACPI_SYSTEM_HID "LNXSYSTM" 558c8eb78fSThomas Renninger #define ACPI_THERMAL_HID "LNXTHERM" 568c8eb78fSThomas Renninger #define ACPI_BUTTON_HID_POWERF "LNXPWRBN" 578c8eb78fSThomas Renninger #define ACPI_BUTTON_HID_SLEEPF "LNXSLPBN" 588c8eb78fSThomas Renninger #define ACPI_VIDEO_HID "LNXVIDEO" 598c8eb78fSThomas Renninger #define ACPI_BAY_HID "LNXIOBAY" 60a340af14SFrank Seidel #define ACPI_DOCK_HID "LNXDOCK" 61a64a62ceSLv Zheng #define ACPI_ECDT_HID "LNXEC" 62222e82acSDarrick J. Wong /* Quirk for broken IBM BIOSes */ 63222e82acSDarrick J. Wong #define ACPI_SMBUS_IBM_HID "SMBUSIBM" 648c8eb78fSThomas Renninger 6546ec8598SBjorn Helgaas /* 6646ec8598SBjorn Helgaas * For fixed hardware buttons, we fabricate acpi_devices with HID 6746ec8598SBjorn Helgaas * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF. Fixed hardware 6846ec8598SBjorn Helgaas * signals only an event; it doesn't supply a notification value. 6946ec8598SBjorn Helgaas * To allow drivers to treat notifications from fixed hardware the 7046ec8598SBjorn Helgaas * same as those from real devices, we turn the events into this 7146ec8598SBjorn Helgaas * notification value. 7246ec8598SBjorn Helgaas */ 7346ec8598SBjorn Helgaas #define ACPI_FIXED_HARDWARE_EVENT 0x100 7446ec8598SBjorn Helgaas 751da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 761da177e4SLinus Torvalds PCI 771da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 781da177e4SLinus Torvalds 791da177e4SLinus Torvalds 801da177e4SLinus Torvalds /* ACPI PCI Interrupt Link (pci_link.c) */ 811da177e4SLinus Torvalds 821da177e4SLinus Torvalds int acpi_irq_penalty_init(void); 8350eca3ebSBob Moore int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, 8450eca3ebSBob Moore int *polarity, char **name); 8587bec66bSDavid Shaohua Li int acpi_pci_link_free_irq(acpi_handle handle); 861da177e4SLinus Torvalds 871da177e4SLinus Torvalds /* ACPI PCI Device Binding (pci_bind.c) */ 881da177e4SLinus Torvalds 891da177e4SLinus Torvalds struct pci_bus; 901da177e4SLinus Torvalds 91*5d32a665SSinan Kaya #ifdef CONFIG_PCI 922f7bbcebSAlexander Chiang struct pci_dev *acpi_get_pci_dev(acpi_handle); 93*5d32a665SSinan Kaya #else 94*5d32a665SSinan Kaya static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle) 95*5d32a665SSinan Kaya { 96*5d32a665SSinan Kaya return NULL; 97*5d32a665SSinan Kaya } 98*5d32a665SSinan Kaya #endif 991da177e4SLinus Torvalds 1001da177e4SLinus Torvalds /* Arch-defined function to add a bus to the system */ 1011da177e4SLinus Torvalds 10257283776SBjorn Helgaas struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root); 1036b90f55fSHanjun Guo 1046b90f55fSHanjun Guo #ifdef CONFIG_X86 1057bc5e3f2SBjorn Helgaas void pci_acpi_crs_quirks(void); 1066b90f55fSHanjun Guo #else 1076b90f55fSHanjun Guo static inline void pci_acpi_crs_quirks(void) { } 1086b90f55fSHanjun Guo #endif 1091da177e4SLinus Torvalds 1101da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 1111da177e4SLinus Torvalds Processor 1121da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 1131da177e4SLinus Torvalds 1141da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_NONE 0x00 1151da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 1161da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 1171da177e4SLinus Torvalds 118fb9802faSLuming Yu /*-------------------------------------------------------------------------- 119c8f7a62cSLen Brown Dock Station 120c8f7a62cSLen Brown -------------------------------------------------------------------------- */ 1211253f7aaSShaohua Li 122e6c215f1SRafael J. Wysocki #ifdef CONFIG_ACPI_DOCK 1233b52b21fSRafael J. Wysocki extern int is_dock_device(struct acpi_device *adev); 124c8f7a62cSLen Brown #else 1253b52b21fSRafael J. Wysocki static inline int is_dock_device(struct acpi_device *adev) 126d94d3dffSAndrew Morton { 127d94d3dffSAndrew Morton return 0; 128d94d3dffSAndrew Morton } 129e6c215f1SRafael J. Wysocki #endif /* CONFIG_ACPI_DOCK */ 130aafbcd16SAlexey Starikovskiy 1311da177e4SLinus Torvalds #endif /*__ACPI_DRIVERS_H__*/ 132