ACPICA 20050408 from Bob Moore
[deliverable/linux.git] / include / acpi / acpixf.h
CommitLineData
1da177e4
LT
1
2/******************************************************************************
3 *
4 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *
6 *****************************************************************************/
7
8/*
9 * Copyright (C) 2000 - 2005, R. Byron Moore
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45
46#ifndef __ACXFACE_H__
47#define __ACXFACE_H__
48
49#include "actypes.h"
50#include "actbl.h"
51
52
44f6c012 53/*
1da177e4
LT
54 * Global interfaces
55 */
1da177e4
LT
56acpi_status
57acpi_initialize_subsystem (
58 void);
59
60acpi_status
61acpi_enable_subsystem (
62 u32 flags);
63
64acpi_status
65acpi_initialize_objects (
66 u32 flags);
67
68acpi_status
69acpi_terminate (
70 void);
71
72#ifdef ACPI_FUTURE_USAGE
73acpi_status
74acpi_subsystem_status (
75 void);
76#endif
77
78acpi_status
79acpi_enable (
80 void);
81
82acpi_status
83acpi_disable (
84 void);
85
86#ifdef ACPI_FUTURE_USAGE
87acpi_status
88acpi_get_system_info (
89 struct acpi_buffer *ret_buffer);
90#endif
91
92const char *
93acpi_format_exception (
94 acpi_status exception);
95
96acpi_status
97acpi_purge_cached_objects (
98 void);
99
100#ifdef ACPI_FUTURE_USAGE
101acpi_status
102acpi_install_initialization_handler (
103 acpi_init_handler handler,
104 u32 function);
105#endif
106
107/*
44f6c012 108 * ACPI Memory managment
1da177e4 109 */
1da177e4
LT
110void *
111acpi_allocate (
112 u32 size);
113
114void *
115acpi_callocate (
116 u32 size);
117
118void
119acpi_free (
120 void *address);
121
122
123/*
124 * ACPI table manipulation interfaces
125 */
1da177e4
LT
126acpi_status
127acpi_find_root_pointer (
128 u32 flags,
129 struct acpi_pointer *rsdp_address);
130
131acpi_status
132acpi_load_tables (
133 void);
134
135#ifdef ACPI_FUTURE_USAGE
136acpi_status
137acpi_load_table (
138 struct acpi_table_header *table_ptr);
139
140acpi_status
141acpi_unload_table (
142 acpi_table_type table_type);
143
144acpi_status
145acpi_get_table_header (
146 acpi_table_type table_type,
147 u32 instance,
148 struct acpi_table_header *out_table_header);
149#endif /* ACPI_FUTURE_USAGE */
150
151acpi_status
152acpi_get_table (
153 acpi_table_type table_type,
154 u32 instance,
155 struct acpi_buffer *ret_buffer);
156
157acpi_status
158acpi_get_firmware_table (
159 acpi_string signature,
160 u32 instance,
161 u32 flags,
162 struct acpi_table_header **table_pointer);
163
164
165/*
166 * Namespace and name interfaces
167 */
1da177e4
LT
168acpi_status
169acpi_walk_namespace (
170 acpi_object_type type,
171 acpi_handle start_object,
172 u32 max_depth,
173 acpi_walk_callback user_function,
174 void *context,
175 void **return_value);
176
177acpi_status
178acpi_get_devices (
179 char *HID,
180 acpi_walk_callback user_function,
181 void *context,
182 void **return_value);
183
184acpi_status
185acpi_get_name (
186 acpi_handle handle,
187 u32 name_type,
188 struct acpi_buffer *ret_path_ptr);
189
190acpi_status
191acpi_get_handle (
192 acpi_handle parent,
193 acpi_string pathname,
194 acpi_handle *ret_handle);
195
196acpi_status
197acpi_attach_data (
198 acpi_handle obj_handle,
199 acpi_object_handler handler,
200 void *data);
201
202acpi_status
203acpi_detach_data (
204 acpi_handle obj_handle,
205 acpi_object_handler handler);
206
207acpi_status
208acpi_get_data (
209 acpi_handle obj_handle,
210 acpi_object_handler handler,
211 void **data);
212
213
214/*
215 * Object manipulation and enumeration
216 */
1da177e4
LT
217acpi_status
218acpi_evaluate_object (
219 acpi_handle object,
220 acpi_string pathname,
221 struct acpi_object_list *parameter_objects,
222 struct acpi_buffer *return_object_buffer);
223
224#ifdef ACPI_FUTURE_USAGE
225acpi_status
226acpi_evaluate_object_typed (
227 acpi_handle object,
228 acpi_string pathname,
229 struct acpi_object_list *external_params,
230 struct acpi_buffer *return_buffer,
231 acpi_object_type return_type);
232#endif
233
234acpi_status
235acpi_get_object_info (
236 acpi_handle handle,
237 struct acpi_buffer *return_buffer);
238
239acpi_status
240acpi_get_next_object (
241 acpi_object_type type,
242 acpi_handle parent,
243 acpi_handle child,
244 acpi_handle *out_handle);
245
246acpi_status
247acpi_get_type (
248 acpi_handle object,
249 acpi_object_type *out_type);
250
251acpi_status
252acpi_get_parent (
253 acpi_handle object,
254 acpi_handle *out_handle);
255
256
257/*
258 * Event handler interfaces
259 */
1da177e4
LT
260acpi_status
261acpi_install_fixed_event_handler (
262 u32 acpi_event,
263 acpi_event_handler handler,
264 void *context);
265
266acpi_status
267acpi_remove_fixed_event_handler (
268 u32 acpi_event,
269 acpi_event_handler handler);
270
271acpi_status
272acpi_install_notify_handler (
273 acpi_handle device,
274 u32 handler_type,
275 acpi_notify_handler handler,
276 void *context);
277
278acpi_status
279acpi_remove_notify_handler (
280 acpi_handle device,
281 u32 handler_type,
282 acpi_notify_handler handler);
283
284acpi_status
285acpi_install_address_space_handler (
286 acpi_handle device,
287 acpi_adr_space_type space_id,
288 acpi_adr_space_handler handler,
289 acpi_adr_space_setup setup,
290 void *context);
291
292acpi_status
293acpi_remove_address_space_handler (
294 acpi_handle device,
295 acpi_adr_space_type space_id,
296 acpi_adr_space_handler handler);
297
298acpi_status
299acpi_install_gpe_handler (
300 acpi_handle gpe_device,
301 u32 gpe_number,
302 u32 type,
303 acpi_event_handler address,
304 void *context);
305
306#ifdef ACPI_FUTURE_USAGE
307acpi_status
308acpi_install_exception_handler (
309 acpi_exception_handler handler);
310#endif
311
312
313/*
314 * Event interfaces
315 */
1da177e4
LT
316acpi_status
317acpi_acquire_global_lock (
318 u16 timeout,
319 u32 *handle);
320
321acpi_status
322acpi_release_global_lock (
323 u32 handle);
324
325acpi_status
326acpi_remove_gpe_handler (
327 acpi_handle gpe_device,
328 u32 gpe_number,
329 acpi_event_handler address);
330
331acpi_status
332acpi_enable_event (
333 u32 event,
334 u32 flags);
335
336acpi_status
337acpi_disable_event (
338 u32 event,
339 u32 flags);
340
341acpi_status
342acpi_clear_event (
343 u32 event);
344
345#ifdef ACPI_FUTURE_USAGE
346acpi_status
347acpi_get_event_status (
348 u32 event,
349 acpi_event_status *event_status);
350#endif /* ACPI_FUTURE_USAGE */
351
352acpi_status
353acpi_set_gpe_type (
354 acpi_handle gpe_device,
355 u32 gpe_number,
356 u8 type);
357
358acpi_status
359acpi_enable_gpe (
360 acpi_handle gpe_device,
361 u32 gpe_number,
362 u32 flags);
363
364acpi_status
365acpi_disable_gpe (
366 acpi_handle gpe_device,
367 u32 gpe_number,
368 u32 flags);
369
370acpi_status
371acpi_clear_gpe (
372 acpi_handle gpe_device,
373 u32 gpe_number,
374 u32 flags);
375
376#ifdef ACPI_FUTURE_USAGE
377acpi_status
378acpi_get_gpe_status (
379 acpi_handle gpe_device,
380 u32 gpe_number,
381 u32 flags,
382 acpi_event_status *event_status);
383#endif /* ACPI_FUTURE_USAGE */
384
385acpi_status
386acpi_install_gpe_block (
387 acpi_handle gpe_device,
388 struct acpi_generic_address *gpe_block_address,
389 u32 register_count,
390 u32 interrupt_level);
391
392acpi_status
393acpi_remove_gpe_block (
394 acpi_handle gpe_device);
395
396
397/*
398 * Resource interfaces
399 */
1da177e4
LT
400typedef
401acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) (
402 struct acpi_resource *resource,
403 void *context);
404
405
406acpi_status
407acpi_get_current_resources(
408 acpi_handle device_handle,
409 struct acpi_buffer *ret_buffer);
410
411#ifdef ACPI_FUTURE_USAGE
412acpi_status
413acpi_get_possible_resources(
414 acpi_handle device_handle,
415 struct acpi_buffer *ret_buffer);
416#endif
417
418acpi_status
419acpi_walk_resources (
420 acpi_handle device_handle,
421 char *path,
422 ACPI_WALK_RESOURCE_CALLBACK user_function,
423 void *context);
424
425acpi_status
426acpi_set_current_resources (
427 acpi_handle device_handle,
428 struct acpi_buffer *in_buffer);
429
430acpi_status
431acpi_get_irq_routing_table (
432 acpi_handle bus_device_handle,
433 struct acpi_buffer *ret_buffer);
434
435acpi_status
436acpi_resource_to_address64 (
437 struct acpi_resource *resource,
438 struct acpi_resource_address64 *out);
439
440/*
441 * Hardware (ACPI device) interfaces
442 */
1da177e4
LT
443acpi_status
444acpi_get_register (
445 u32 register_id,
446 u32 *return_value,
447 u32 flags);
448
449acpi_status
450acpi_set_register (
451 u32 register_id,
452 u32 value,
453 u32 flags);
454
455acpi_status
456acpi_set_firmware_waking_vector (
457 acpi_physical_address physical_address);
458
459#ifdef ACPI_FUTURE_USAGE
460acpi_status
461acpi_get_firmware_waking_vector (
462 acpi_physical_address *physical_address);
463#endif
464
465acpi_status
466acpi_get_sleep_type_data (
467 u8 sleep_state,
468 u8 *slp_typ_a,
469 u8 *slp_typ_b);
470
471acpi_status
472acpi_enter_sleep_state_prep (
473 u8 sleep_state);
474
475acpi_status asmlinkage
476acpi_enter_sleep_state (
477 u8 sleep_state);
478
479acpi_status asmlinkage
480acpi_enter_sleep_state_s4bios (
481 void);
482
483acpi_status
484acpi_leave_sleep_state (
485 u8 sleep_state);
486
487
488#endif /* __ACXFACE_H__ */
This page took 0.055388 seconds and 5 git commands to generate.