import of ftp.dlink.com/GPL/DSMG-600_reB/ppclinux.tar.gz
[linux-2.4.21-pre4.git] / drivers / acpi / include / acevents.h
1 /******************************************************************************
2  *
3  * Name: acevents.h - Event subcomponent prototypes and defines
4  *       $Revision: 1.1.1.1 $
5  *
6  *****************************************************************************/
7
8 /*
9  *  Copyright (C) 2000, 2001 R. Byron Moore
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26 #ifndef __ACEVENTS_H__
27 #define __ACEVENTS_H__
28
29
30 acpi_status
31 acpi_ev_initialize (
32         void);
33
34
35 /*
36  * Acpi_evfixed - Fixed event handling
37  */
38
39 acpi_status
40 acpi_ev_fixed_event_initialize (
41         void);
42
43 u32
44 acpi_ev_fixed_event_detect (
45         void);
46
47 u32
48 acpi_ev_fixed_event_dispatch (
49         u32                     acpi_event);
50
51
52 /*
53  * Acpi_evglock - Global Lock support
54  */
55
56 acpi_status
57 acpi_ev_acquire_global_lock(
58         void);
59
60 void
61 acpi_ev_release_global_lock(
62         void);
63
64 acpi_status
65 acpi_ev_init_global_lock_handler (
66         void);
67
68
69 /*
70  * Acpi_evgpe - GPE handling and dispatch
71  */
72
73 acpi_status
74 acpi_ev_gpe_initialize (
75         void);
76
77 acpi_status
78 acpi_ev_init_gpe_control_methods (
79         void);
80
81 u32
82 acpi_ev_gpe_dispatch (
83         u32                     gpe_number);
84
85 u32
86 acpi_ev_gpe_detect (
87         void);
88
89
90 /*
91  * Acpi_evnotify - Device Notify handling and dispatch
92  */
93
94 acpi_status
95 acpi_ev_queue_notify_request (
96         acpi_namespace_node     *node,
97         u32                     notify_value);
98
99 void
100 acpi_ev_notify_dispatch (
101         void                    *context);
102
103 /*
104  * Acpi_evregion - Address Space handling
105  */
106
107 acpi_status
108 acpi_ev_install_default_address_space_handlers (
109         void);
110
111 acpi_status
112 acpi_ev_address_space_dispatch (
113         acpi_operand_object    *region_obj,
114         u32                     function,
115         ACPI_PHYSICAL_ADDRESS   address,
116         u32                     bit_width,
117         u32                     *value);
118
119
120 acpi_status
121 acpi_ev_addr_handler_helper (
122         acpi_handle             obj_handle,
123         u32                     level,
124         void                    *context,
125         void                    **return_value);
126
127 void
128 acpi_ev_disassociate_region_from_handler(
129         acpi_operand_object    *region_obj,
130         u8                      acpi_ns_is_locked);
131
132
133 acpi_status
134 acpi_ev_associate_region_and_handler (
135         acpi_operand_object     *handler_obj,
136         acpi_operand_object     *region_obj,
137         u8                      acpi_ns_is_locked);
138
139
140 /*
141  * Acpi_evregini - Region initialization and setup
142  */
143
144 acpi_status
145 acpi_ev_system_memory_region_setup (
146         acpi_handle             handle,
147         u32                     function,
148         void                    *handler_context,
149         void                    **region_context);
150
151 acpi_status
152 acpi_ev_io_space_region_setup (
153         acpi_handle             handle,
154         u32                     function,
155         void                    *handler_context,
156         void                    **region_context);
157
158 acpi_status
159 acpi_ev_pci_config_region_setup (
160         acpi_handle             handle,
161         u32                     function,
162         void                    *handler_context,
163         void                    **region_context);
164
165 acpi_status
166 acpi_ev_cmos_region_setup (
167         acpi_handle             handle,
168         u32                     function,
169         void                    *handler_context,
170         void                    **region_context);
171
172 acpi_status
173 acpi_ev_pci_bar_region_setup (
174         acpi_handle             handle,
175         u32                     function,
176         void                    *handler_context,
177         void                    **region_context);
178
179 acpi_status
180 acpi_ev_default_region_setup (
181         acpi_handle             handle,
182         u32                     function,
183         void                    *handler_context,
184         void                    **region_context);
185
186 acpi_status
187 acpi_ev_initialize_region (
188         acpi_operand_object     *region_obj,
189         u8                      acpi_ns_locked);
190
191
192 /*
193  * Evsci - SCI (System Control Interrupt) handling/dispatch
194  */
195
196 u32
197 acpi_ev_install_sci_handler (
198         void);
199
200 acpi_status
201 acpi_ev_remove_sci_handler (
202         void);
203
204 u32
205 acpi_ev_initialize_sCI (
206         u32                     program_sCI);
207
208 void
209 acpi_ev_restore_acpi_state (
210         void);
211
212 void
213 acpi_ev_terminate (
214         void);
215
216
217 #endif  /* __ACEVENTS_H__  */