import of ftp.dlink.com/GPL/DSMG-600_reB/ppclinux.tar.gz
[linux-2.4.21-pre4.git] / drivers / acpi / include / acpixf.h
1
2 /******************************************************************************
3  *
4  * Name: acpixf.h - External interfaces to the ACPI subsystem
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
27 #ifndef __ACXFACE_H__
28 #define __ACXFACE_H__
29
30 #include "actypes.h"
31 #include "actbl.h"
32
33
34  /*
35  * Global interfaces
36  */
37
38 acpi_status
39 acpi_initialize_subsystem (
40         void);
41
42 acpi_status
43 acpi_enable_subsystem (
44         u32                     flags);
45
46 acpi_status
47 acpi_terminate (
48         void);
49
50 acpi_status
51 acpi_subsystem_status (
52         void);
53
54 acpi_status
55 acpi_enable (
56         void);
57
58 acpi_status
59 acpi_disable (
60         void);
61
62 acpi_status
63 acpi_get_system_info (
64         acpi_buffer             *ret_buffer);
65
66 const char *
67 acpi_format_exception (
68         acpi_status             exception);
69
70
71 /*
72  * ACPI Memory manager
73  */
74
75 void *
76 acpi_allocate (
77         u32                     size);
78
79 void *
80 acpi_callocate (
81         u32                     size);
82
83 void
84 acpi_free (
85         void                    *address);
86
87
88 /*
89  * ACPI table manipulation interfaces
90  */
91
92 acpi_status
93 acpi_find_root_pointer (
94         u32                     flags,
95         ACPI_PHYSICAL_ADDRESS   *rsdp_physical_address);
96
97 acpi_status
98 acpi_load_tables (
99         void);
100
101 acpi_status
102 acpi_load_table (
103         acpi_table_header       *table_ptr);
104
105 acpi_status
106 acpi_unload_table (
107         acpi_table_type         table_type);
108
109 acpi_status
110 acpi_get_table_header (
111         acpi_table_type         table_type,
112         u32                     instance,
113         acpi_table_header       *out_table_header);
114
115 acpi_status
116 acpi_get_table (
117         acpi_table_type         table_type,
118         u32                     instance,
119         acpi_buffer             *ret_buffer);
120
121 acpi_status
122 acpi_get_firmware_table (
123         acpi_string             signature,
124         u32                     instance,
125         u32                     flags,
126         acpi_table_header       **table_pointer);
127
128
129 /*
130  * Namespace and name interfaces
131  */
132
133 acpi_status
134 acpi_walk_namespace (
135         acpi_object_type        type,
136         acpi_handle             start_object,
137         u32                     max_depth,
138         acpi_walk_callback      user_function,
139         void                    *context,
140         void *                  *return_value);
141
142 acpi_status
143 acpi_get_devices (
144         NATIVE_CHAR             *HID,
145         acpi_walk_callback      user_function,
146         void                    *context,
147         void                    **return_value);
148
149 acpi_status
150 acpi_get_name (
151         acpi_handle             handle,
152         u32                     name_type,
153         acpi_buffer             *ret_path_ptr);
154
155 acpi_status
156 acpi_get_handle (
157         acpi_handle             parent,
158         acpi_string             pathname,
159         acpi_handle             *ret_handle);
160
161
162 /*
163  * Object manipulation and enumeration
164  */
165
166 acpi_status
167 acpi_evaluate_object (
168         acpi_handle             object,
169         acpi_string             pathname,
170         acpi_object_list        *parameter_objects,
171         acpi_buffer             *return_object_buffer);
172
173 acpi_status
174 acpi_get_object_info (
175         acpi_handle             device,
176         acpi_device_info        *info);
177
178 acpi_status
179 acpi_get_next_object (
180         acpi_object_type        type,
181         acpi_handle             parent,
182         acpi_handle             child,
183         acpi_handle             *out_handle);
184
185 acpi_status
186 acpi_get_type (
187         acpi_handle             object,
188         acpi_object_type        *out_type);
189
190 acpi_status
191 acpi_get_parent (
192         acpi_handle             object,
193         acpi_handle             *out_handle);
194
195
196 /*
197  * Event handler interfaces
198  */
199
200 acpi_status
201 acpi_install_fixed_event_handler (
202         u32                     acpi_event,
203         acpi_event_handler      handler,
204         void                    *context);
205
206 acpi_status
207 acpi_remove_fixed_event_handler (
208         u32                     acpi_event,
209         acpi_event_handler      handler);
210
211 acpi_status
212 acpi_install_notify_handler (
213         acpi_handle             device,
214         u32                     handler_type,
215         acpi_notify_handler     handler,
216         void                    *context);
217
218 acpi_status
219 acpi_remove_notify_handler (
220         acpi_handle             device,
221         u32                     handler_type,
222         acpi_notify_handler     handler);
223
224 acpi_status
225 acpi_install_address_space_handler (
226         acpi_handle             device,
227         ACPI_ADR_SPACE_TYPE     space_id,
228         acpi_adr_space_handler  handler,
229         acpi_adr_space_setup    setup,
230         void                    *context);
231
232 acpi_status
233 acpi_remove_address_space_handler (
234         acpi_handle             device,
235         ACPI_ADR_SPACE_TYPE     space_id,
236         acpi_adr_space_handler  handler);
237
238 acpi_status
239 acpi_install_gpe_handler (
240         u32                     gpe_number,
241         u32                     type,
242         acpi_gpe_handler        handler,
243         void                    *context);
244
245 acpi_status
246 acpi_acquire_global_lock (
247         void);
248
249 acpi_status
250 acpi_release_global_lock (
251         void);
252
253 acpi_status
254 acpi_remove_gpe_handler (
255         u32                     gpe_number,
256         acpi_gpe_handler        handler);
257
258 acpi_status
259 acpi_enable_event (
260         u32                     acpi_event,
261         u32                     type,
262         u32                     flags);
263
264 acpi_status
265 acpi_disable_event (
266         u32                     acpi_event,
267         u32                     type,
268         u32                     flags);
269
270 acpi_status
271 acpi_clear_event (
272         u32                     acpi_event,
273         u32                     type);
274
275 acpi_status
276 acpi_get_event_status (
277         u32                     acpi_event,
278         u32                     type,
279         acpi_event_status       *event_status);
280
281 /*
282  * Resource interfaces
283  */
284
285 acpi_status
286 acpi_get_current_resources(
287         acpi_handle             device_handle,
288         acpi_buffer             *ret_buffer);
289
290 acpi_status
291 acpi_get_possible_resources(
292         acpi_handle             device_handle,
293         acpi_buffer             *ret_buffer);
294
295 acpi_status
296 acpi_set_current_resources (
297         acpi_handle             device_handle,
298         acpi_buffer             *in_buffer);
299
300 acpi_status
301 acpi_get_irq_routing_table (
302         acpi_handle             bus_device_handle,
303         acpi_buffer             *ret_buffer);
304
305
306 /*
307  * Hardware (ACPI device) interfaces
308  */
309
310 acpi_status
311 acpi_set_firmware_waking_vector (
312         ACPI_PHYSICAL_ADDRESS   physical_address);
313
314 acpi_status
315 acpi_get_firmware_waking_vector (
316         ACPI_PHYSICAL_ADDRESS   *physical_address);
317
318 acpi_status
319 acpi_enter_sleep_state (
320         u8 sleep_state);
321
322 acpi_status
323 acpi_leave_sleep_state (
324         u8 sleep_state);
325
326 #endif /* __ACXFACE_H__ */