/*1* acpi_drivers.h ($Revision: 31 $)2*3* Copyright (C) 2001, 2002 Andy Grover <[email protected]>4* Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>5*6* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or (at11* your option) any later version.12*13* This program is distributed in the hope that it will be useful, but14* WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU16* General Public License for more details.17*18* You should have received a copy of the GNU General Public License along19* with this program; if not, write to the Free Software Foundation, Inc.,20* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.21*22* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~23*/2425#ifndef __ACPI_DRIVERS_H__26#define __ACPI_DRIVERS_H__2728#include <linux/acpi.h>29#include <acpi/acpi_bus.h>3031#define ACPI_MAX_STRING 803233/*34* Please update drivers/acpi/debug.c and Documentation/acpi/debug.txt35* if you add to this list.36*/37#define ACPI_BUS_COMPONENT 0x0001000038#define ACPI_AC_COMPONENT 0x0002000039#define ACPI_BATTERY_COMPONENT 0x0004000040#define ACPI_BUTTON_COMPONENT 0x0008000041#define ACPI_SBS_COMPONENT 0x0010000042#define ACPI_FAN_COMPONENT 0x0020000043#define ACPI_PCI_COMPONENT 0x0040000044#define ACPI_POWER_COMPONENT 0x0080000045#define ACPI_CONTAINER_COMPONENT 0x0100000046#define ACPI_SYSTEM_COMPONENT 0x0200000047#define ACPI_THERMAL_COMPONENT 0x0400000048#define ACPI_MEMORY_DEVICE_COMPONENT 0x0800000049#define ACPI_VIDEO_COMPONENT 0x1000000050#define ACPI_PROCESSOR_COMPONENT 0x200000005152/*53* _HID definitions54* HIDs must conform to ACPI spec(6.1.4)55* Linux specific HIDs do not apply to this and begin with LNX:56*/5758#define ACPI_POWER_HID "LNXPOWER"59#define ACPI_PROCESSOR_OBJECT_HID "LNXCPU"60#define ACPI_SYSTEM_HID "LNXSYSTM"61#define ACPI_THERMAL_HID "LNXTHERM"62#define ACPI_BUTTON_HID_POWERF "LNXPWRBN"63#define ACPI_BUTTON_HID_SLEEPF "LNXSLPBN"64#define ACPI_VIDEO_HID "LNXVIDEO"65#define ACPI_BAY_HID "LNXIOBAY"66#define ACPI_DOCK_HID "LNXDOCK"67/* Quirk for broken IBM BIOSes */68#define ACPI_SMBUS_IBM_HID "SMBUSIBM"6970/*71* For fixed hardware buttons, we fabricate acpi_devices with HID72* ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF. Fixed hardware73* signals only an event; it doesn't supply a notification value.74* To allow drivers to treat notifications from fixed hardware the75* same as those from real devices, we turn the events into this76* notification value.77*/78#define ACPI_FIXED_HARDWARE_EVENT 0x1007980/* --------------------------------------------------------------------------81PCI82-------------------------------------------------------------------------- */838485/* ACPI PCI Interrupt Link (pci_link.c) */8687int acpi_irq_penalty_init(void);88int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,89int *polarity, char **name);90int acpi_pci_link_free_irq(acpi_handle handle);9192/* ACPI PCI Interrupt Routing (pci_irq.c) */9394int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus);95void acpi_pci_irq_del_prt(struct pci_bus *bus);9697/* ACPI PCI Device Binding (pci_bind.c) */9899struct pci_bus;100101struct pci_dev *acpi_get_pci_dev(acpi_handle);102int acpi_pci_bind_root(struct acpi_device *device);103104/* Arch-defined function to add a bus to the system */105106struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);107void pci_acpi_crs_quirks(void);108109/* --------------------------------------------------------------------------110Processor111-------------------------------------------------------------------------- */112113#define ACPI_PROCESSOR_LIMIT_NONE 0x00114#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01115#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02116117/*--------------------------------------------------------------------------118Dock Station119-------------------------------------------------------------------------- */120struct acpi_dock_ops {121acpi_notify_handler handler;122acpi_notify_handler uevent;123};124125#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)126extern int is_dock_device(acpi_handle handle);127extern int register_dock_notifier(struct notifier_block *nb);128extern void unregister_dock_notifier(struct notifier_block *nb);129extern int register_hotplug_dock_device(acpi_handle handle,130struct acpi_dock_ops *ops,131void *context);132extern void unregister_hotplug_dock_device(acpi_handle handle);133#else134static inline int is_dock_device(acpi_handle handle)135{136return 0;137}138static inline int register_dock_notifier(struct notifier_block *nb)139{140return -ENODEV;141}142static inline void unregister_dock_notifier(struct notifier_block *nb)143{144}145static inline int register_hotplug_dock_device(acpi_handle handle,146struct acpi_dock_ops *ops,147void *context)148{149return -ENODEV;150}151static inline void unregister_hotplug_dock_device(acpi_handle handle)152{153}154#endif155156#endif /*__ACPI_DRIVERS_H__*/157158159