1*1da177e4SLinus Torvalds /* 2*1da177e4SLinus Torvalds * acpi_drivers.h ($Revision: 31 $) 3*1da177e4SLinus Torvalds * 4*1da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> 5*1da177e4SLinus Torvalds * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 6*1da177e4SLinus Torvalds * 7*1da177e4SLinus Torvalds * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8*1da177e4SLinus Torvalds * 9*1da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 10*1da177e4SLinus Torvalds * it under the terms of the GNU General Public License as published by 11*1da177e4SLinus Torvalds * the Free Software Foundation; either version 2 of the License, or (at 12*1da177e4SLinus Torvalds * your option) any later version. 13*1da177e4SLinus Torvalds * 14*1da177e4SLinus Torvalds * This program is distributed in the hope that it will be useful, but 15*1da177e4SLinus Torvalds * WITHOUT ANY WARRANTY; without even the implied warranty of 16*1da177e4SLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17*1da177e4SLinus Torvalds * General Public License for more details. 18*1da177e4SLinus Torvalds * 19*1da177e4SLinus Torvalds * You should have received a copy of the GNU General Public License along 20*1da177e4SLinus Torvalds * with this program; if not, write to the Free Software Foundation, Inc., 21*1da177e4SLinus Torvalds * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 22*1da177e4SLinus Torvalds * 23*1da177e4SLinus Torvalds * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24*1da177e4SLinus Torvalds */ 25*1da177e4SLinus Torvalds 26*1da177e4SLinus Torvalds #ifndef __ACPI_DRIVERS_H__ 27*1da177e4SLinus Torvalds #define __ACPI_DRIVERS_H__ 28*1da177e4SLinus Torvalds 29*1da177e4SLinus Torvalds #include <linux/acpi.h> 30*1da177e4SLinus Torvalds #include <acpi/acpi_bus.h> 31*1da177e4SLinus Torvalds 32*1da177e4SLinus Torvalds 33*1da177e4SLinus Torvalds #define ACPI_MAX_STRING 80 34*1da177e4SLinus Torvalds 35*1da177e4SLinus Torvalds #define ACPI_BUS_COMPONENT 0x00010000 36*1da177e4SLinus Torvalds #define ACPI_SYSTEM_COMPONENT 0x02000000 37*1da177e4SLinus Torvalds 38*1da177e4SLinus Torvalds /* _HID definitions */ 39*1da177e4SLinus Torvalds 40*1da177e4SLinus Torvalds #define ACPI_POWER_HID "ACPI_PWR" 41*1da177e4SLinus Torvalds #define ACPI_PROCESSOR_HID "ACPI_CPU" 42*1da177e4SLinus Torvalds #define ACPI_SYSTEM_HID "ACPI_SYS" 43*1da177e4SLinus Torvalds #define ACPI_THERMAL_HID "ACPI_THM" 44*1da177e4SLinus Torvalds #define ACPI_BUTTON_HID_POWERF "ACPI_FPB" 45*1da177e4SLinus Torvalds #define ACPI_BUTTON_HID_SLEEPF "ACPI_FSB" 46*1da177e4SLinus Torvalds 47*1da177e4SLinus Torvalds 48*1da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 49*1da177e4SLinus Torvalds PCI 50*1da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 51*1da177e4SLinus Torvalds 52*1da177e4SLinus Torvalds #ifdef CONFIG_ACPI_PCI 53*1da177e4SLinus Torvalds 54*1da177e4SLinus Torvalds #define ACPI_PCI_COMPONENT 0x00400000 55*1da177e4SLinus Torvalds 56*1da177e4SLinus Torvalds /* ACPI PCI Interrupt Link (pci_link.c) */ 57*1da177e4SLinus Torvalds 58*1da177e4SLinus Torvalds int acpi_irq_penalty_init (void); 59*1da177e4SLinus Torvalds int acpi_pci_link_get_irq (acpi_handle handle, int index, int *edge_level, 60*1da177e4SLinus Torvalds int *active_high_low, char **name); 61*1da177e4SLinus Torvalds 62*1da177e4SLinus Torvalds /* ACPI PCI Interrupt Routing (pci_irq.c) */ 63*1da177e4SLinus Torvalds 64*1da177e4SLinus Torvalds int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus); 65*1da177e4SLinus Torvalds void acpi_pci_irq_del_prt (int segment, int bus); 66*1da177e4SLinus Torvalds 67*1da177e4SLinus Torvalds /* ACPI PCI Device Binding (pci_bind.c) */ 68*1da177e4SLinus Torvalds 69*1da177e4SLinus Torvalds struct pci_bus; 70*1da177e4SLinus Torvalds 71*1da177e4SLinus Torvalds int acpi_pci_bind (struct acpi_device *device); 72*1da177e4SLinus Torvalds int acpi_pci_unbind (struct acpi_device *device); 73*1da177e4SLinus Torvalds int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus); 74*1da177e4SLinus Torvalds 75*1da177e4SLinus Torvalds /* Arch-defined function to add a bus to the system */ 76*1da177e4SLinus Torvalds 77*1da177e4SLinus Torvalds struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, int bus); 78*1da177e4SLinus Torvalds 79*1da177e4SLinus Torvalds #endif /*CONFIG_ACPI_PCI*/ 80*1da177e4SLinus Torvalds 81*1da177e4SLinus Torvalds 82*1da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 83*1da177e4SLinus Torvalds Power Resource 84*1da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 85*1da177e4SLinus Torvalds 86*1da177e4SLinus Torvalds #ifdef CONFIG_ACPI_POWER 87*1da177e4SLinus Torvalds int acpi_enable_wakeup_device_power (struct acpi_device *dev); 88*1da177e4SLinus Torvalds int acpi_disable_wakeup_device_power (struct acpi_device *dev); 89*1da177e4SLinus Torvalds int acpi_power_get_inferred_state (struct acpi_device *device); 90*1da177e4SLinus Torvalds int acpi_power_transition (struct acpi_device *device, int state); 91*1da177e4SLinus Torvalds #endif 92*1da177e4SLinus Torvalds 93*1da177e4SLinus Torvalds 94*1da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 95*1da177e4SLinus Torvalds Embedded Controller 96*1da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 97*1da177e4SLinus Torvalds #ifdef CONFIG_ACPI_EC 98*1da177e4SLinus Torvalds int acpi_ec_ecdt_probe (void); 99*1da177e4SLinus Torvalds #endif 100*1da177e4SLinus Torvalds 101*1da177e4SLinus Torvalds /* -------------------------------------------------------------------------- 102*1da177e4SLinus Torvalds Processor 103*1da177e4SLinus Torvalds -------------------------------------------------------------------------- */ 104*1da177e4SLinus Torvalds 105*1da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_NONE 0x00 106*1da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 107*1da177e4SLinus Torvalds #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 108*1da177e4SLinus Torvalds 109*1da177e4SLinus Torvalds int acpi_processor_set_thermal_limit(acpi_handle handle, int type); 110*1da177e4SLinus Torvalds 111*1da177e4SLinus Torvalds 112*1da177e4SLinus Torvalds #endif /*__ACPI_DRIVERS_H__*/ 113