acpiphp.h revision df77cd10078e36e1b89964e5e8c206add399a98d
11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * ACPI PCI Hot Plug Controller Driver
31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 1995,2001 Compaq Computer Corporation
51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2001 IBM Corp.
71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2002,2003 Takayoshi Kochi (t-kochi@bq.jp.nec.com)
91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (C) 2002,2003 NEC Corporation
1042f49a6ae5dca90cd0594475502bf1c43ff1dc07Rajesh Shah * Copyright (C) 2003-2005 Matthew Wilcox (matthew.wilcox@hp.com)
1142f49a6ae5dca90cd0594475502bf1c43ff1dc07Rajesh Shah * Copyright (C) 2003-2005 Hewlett Packard
121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * All rights reserved.
141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is free software; you can redistribute it and/or modify
161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * it under the terms of the GNU General Public License as published by
171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * the Free Software Foundation; either version 2 of the License, or (at
181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * your option) any later version.
191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is distributed in the hope that it will be useful, but
211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * WITHOUT ANY WARRANTY; without even the implied warranty of
221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * NON INFRINGEMENT.  See the GNU General Public License for more
241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * details.
251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * You should have received a copy of the GNU General Public License
271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * along with this program; if not, write to the Free Software
281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Send feedback to <gregkh@us.ibm.com>,
311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *		    <t-kochi@bq.jp.nec.com>
321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef _ACPIPHP_H
361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define _ACPIPHP_H
371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include <linux/acpi.h>
39aab0de245150c09e61c30962feb16aacde508dc3Kay Sievers#include <linux/kobject.h>
406aa4cdd07139ba4d5b89139b0070d795cc4dea88Ingo Molnar#include <linux/mutex.h>
417a54f25cef6c763f16c9fd49ae382de162147873Greg Kroah-Hartman#include <linux/pci_hotplug.h>
421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define dbg(format, arg...)					\
441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	do {							\
451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds		if (acpiphp_debug)				\
461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			printk(KERN_DEBUG "%s: " format,	\
471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds				MY_NAME , ## arg); 		\
481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	} while (0)
491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_bridge;
541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_slot;
551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * struct slot - slot information for each *physical* slot
581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct slot {
601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct hotplug_slot	*hotplug_slot;
611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct acpiphp_slot	*acpi_slot;
62ac9e98918776d8fa6dc38bfa6d298a7dbcbac2cbRolf Eike Beer	struct hotplug_slot_info info;
631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
65df77cd10078e36e1b89964e5e8c206add399a98dAlex Chiangstatic inline const char *slot_name(struct slot *slot)
66df77cd10078e36e1b89964e5e8c206add399a98dAlex Chiang{
67df77cd10078e36e1b89964e5e8c206add399a98dAlex Chiang	return hotplug_slot_name(slot->hotplug_slot);
68df77cd10078e36e1b89964e5e8c206add399a98dAlex Chiang}
69df77cd10078e36e1b89964e5e8c206add399a98dAlex Chiang
7026e6c66e47fe7f69ef6ddb078e312204a1f17823Randy Dunlap/*
711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * struct acpiphp_bridge - PCI bridge information
721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * for each bridge device in ACPI namespace
741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_bridge {
761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct list_head list;
771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	acpi_handle handle;
781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct acpiphp_slot *slots;
79551bcb75b3d9f23348a524210ccfff26d865e425MUNEDA Takahiro
80551bcb75b3d9f23348a524210ccfff26d865e425MUNEDA Takahiro	/* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */
81551bcb75b3d9f23348a524210ccfff26d865e425MUNEDA Takahiro	struct acpiphp_func *func;
82551bcb75b3d9f23348a524210ccfff26d865e425MUNEDA Takahiro
831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	int type;
841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	int nr_slots;
851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u32 flags;
871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	/* This bus (host bridge) or Secondary bus (PCI-to-PCI bridge) */
891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct pci_bus *pci_bus;
901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	/* PCI-to-PCI bridge device */
921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct pci_dev *pci_dev;
931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	/* ACPI 2.0 _HPP parameters */
95783c49fc506d9afe4784390b556fa25ede5d6d1fKristen Accardi	struct hotplug_params hpp;
961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	spinlock_t res_lock;
981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10126e6c66e47fe7f69ef6ddb078e312204a1f17823Randy Dunlap/*
1021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * struct acpiphp_slot - PCI slot information
1031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * PCI slot information for each *physical* PCI slot
1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_slot {
1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct acpiphp_slot *next;
1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct acpiphp_bridge *bridge;	/* parent */
1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct list_head funcs;		/* one slot may have different
1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds					   objects (i.e. for each function) */
111e27da3814170385a4d2797397d706e554635812dMUNEDA Takahiro	struct slot *slot;
1126aa4cdd07139ba4d5b89139b0070d795cc4dea88Ingo Molnar	struct mutex crit_sect;
1131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u8		device;		/* pci device# */
1151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u32		sun;		/* ACPI _SUN (slot unique number) */
1171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u32		flags;		/* see below */
1181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12126e6c66e47fe7f69ef6ddb078e312204a1f17823Randy Dunlap/*
1221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * struct acpiphp_func - PCI function information
1231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
1241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * PCI function information for each object in ACPI namespace
1251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * typically 8 objects per slot (i.e. for each PCI function)
1261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
1271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_func {
1281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct acpiphp_slot *slot;	/* parent */
129551bcb75b3d9f23348a524210ccfff26d865e425MUNEDA Takahiro	struct acpiphp_bridge *bridge;	/* Ejectable PCI-to-PCI bridge */
1301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct list_head sibling;
1321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct pci_dev *pci_dev;
1334e8662bbd680c54496189ac68f398e847f3ca374Kristen Accardi	struct notifier_block nb;
1341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	acpi_handle	handle;
1351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u8		function;	/* pci function# */
1371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	u32		flags;		/* see below */
1381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
14026e6c66e47fe7f69ef6ddb078e312204a1f17823Randy Dunlap/*
1411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * struct acpiphp_attention_info - device specific attention registration
1421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
1431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * ACPI has no generic method of setting/getting attention status
1441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * this allows for device specific driver registration
1451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
1461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct acpiphp_attention_info
1471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds{
1481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	int (*set_attn)(struct hotplug_slot *slot, u8 status);
1491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	int (*get_attn)(struct hotplug_slot *slot, u8 *status);
1501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	struct module *owner;
1511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
153600812ecead0da2e7b6f9e5f5aad68b1ad8ae581Satoru Takeuchistruct acpiphp_ioapic {
154600812ecead0da2e7b6f9e5f5aad68b1ad8ae581Satoru Takeuchi	struct pci_dev *dev;
155600812ecead0da2e7b6f9e5f5aad68b1ad8ae581Satoru Takeuchi	u32 gsi_base;
156600812ecead0da2e7b6f9e5f5aad68b1ad8ae581Satoru Takeuchi	struct list_head list;
157600812ecead0da2e7b6f9e5f5aad68b1ad8ae581Satoru Takeuchi};
15820416ea54087c25502d6fb973b8e119973e16341Kristen Accardi
1591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* PCI bus bridge HID */
1601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_PCI_HOST_HID		"PNP0A03"
1611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* PCI BRIDGE type */
1631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_TYPE_HOST		0
1641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_TYPE_P2P			1
1651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* ACPI _STA method value (ignore bit 4; battery present) */
1671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_STA_PRESENT		(0x00000001)
1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_STA_ENABLED		(0x00000002)
1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_STA_SHOW_IN_UI		(0x00000004)
1701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_STA_FUNCTIONING		(0x00000008)
1711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ACPI_STA_ALL			(0x0000000f)
1721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* bridge flags */
1741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_STA		(0x00000001)
1751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_EJ0		(0x00000002)
1761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_HPP		(0x00000004)
1771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_PS0		(0x00000010)
1781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_PS1		(0x00000020)
1791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_PS2		(0x00000040)
1801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BRIDGE_HAS_PS3		(0x00000080)
1811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* slot flags */
1831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SLOT_POWEREDON		(0x00000001)
1851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SLOT_ENABLED		(0x00000002)
1861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SLOT_MULTIFUNCTION	(0x00000004)
1871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* function flags */
1891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_STA		(0x00000001)
1911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_EJ0		(0x00000002)
1921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_PS0		(0x00000010)
1931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_PS1		(0x00000020)
1941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_PS2		(0x00000040)
1951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FUNC_HAS_PS3		(0x00000080)
19620416ea54087c25502d6fb973b8e119973e16341Kristen Accardi#define FUNC_HAS_DCK            (0x00000100)
1971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* function prototypes */
1991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* acpiphp_core.c */
2011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_register_attention(struct acpiphp_attention_info*info);
2021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
203e27da3814170385a4d2797397d706e554635812dMUNEDA Takahiroextern int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
204e27da3814170385a4d2797397d706e554635812dMUNEDA Takahiroextern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
2051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* acpiphp_glue.c */
2071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_glue_init (void);
2081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern void acpiphp_glue_exit (void);
2091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_get_num_slots (void);
2101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
2111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_enable_slot (struct acpiphp_slot *slot);
2131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_disable_slot (struct acpiphp_slot *slot);
214bfceafc5979d9055e04f03f970de6ff7a4bce1b6Gary Hadeextern int acpiphp_eject_slot (struct acpiphp_slot *slot);
2151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern u8 acpiphp_get_power_status (struct acpiphp_slot *slot);
2161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern u8 acpiphp_get_attention_status (struct acpiphp_slot *slot);
2171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
2181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
2191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* variables */
2211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int acpiphp_debug;
2221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif /* _ACPIPHP_H */
224