Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /****************************************************************************** |
2 | * | |
3 | * Name: acpixf.h - External interfaces to the ACPI subsystem | |
4 | * | |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
fbb7a2dc | 8 | * Copyright (C) 2000 - 2014, Intel Corp. |
1da177e4 LT |
9 | * All rights reserved. |
10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | |
15 | * notice, this list of conditions, and the following disclaimer, | |
16 | * without modification. | |
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | |
18 | * substantially similar to the "NO WARRANTY" disclaimer below | |
19 | * ("Disclaimer") and any redistribution must be conditioned upon | |
20 | * including a substantially similar Disclaimer requirement for further | |
21 | * binary redistribution. | |
22 | * 3. Neither the names of the above-listed copyright holders nor the names | |
23 | * of any contributors may be used to endorse or promote products derived | |
24 | * from this software without specific prior written permission. | |
25 | * | |
26 | * Alternatively, this software may be distributed under the terms of the | |
27 | * GNU General Public License ("GPL") version 2 as published by the Free | |
28 | * Software Foundation. | |
29 | * | |
30 | * NO WARRANTY | |
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | |
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
41 | * POSSIBILITY OF SUCH DAMAGES. | |
42 | */ | |
43 | ||
1da177e4 LT |
44 | #ifndef __ACXFACE_H__ |
45 | #define __ACXFACE_H__ | |
46 | ||
50df4d8b BM |
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | ||
35476c75 | 49 | #define ACPI_CA_VERSION 0x20140325 |
50df4d8b | 50 | |
a1ce3928 DH |
51 | #include <acpi/acconfig.h> |
52 | #include <acpi/actypes.h> | |
53 | #include <acpi/actbl.h> | |
d8dc91b7 | 54 | #include <acpi/acbuffer.h> |
1da177e4 | 55 | |
889c78be LM |
56 | extern u8 acpi_gbl_permanent_mmap; |
57 | ||
50df4d8b | 58 | /* |
75c8044f | 59 | * Globals that are publically available |
50df4d8b | 60 | */ |
739dcbb9 LZ |
61 | extern u32 acpi_current_gpe_count; |
62 | extern struct acpi_table_fadt acpi_gbl_FADT; | |
63 | extern u8 acpi_gbl_system_awake_and_running; | |
64 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ | |
242b2287 | 65 | extern u8 acpi_gbl_osi_data; |
3e8214e5 | 66 | |
75c8044f | 67 | /* Runtime configuration of debug print levels */ |
3e8214e5 | 68 | |
50df4d8b BM |
69 | extern u32 acpi_dbg_level; |
70 | extern u32 acpi_dbg_layer; | |
3e8214e5 | 71 | |
75c8044f | 72 | /* ACPICA runtime options */ |
3e8214e5 | 73 | |
22b5afce | 74 | extern u8 acpi_gbl_auto_serialize_methods; |
69ec87ef | 75 | extern u8 acpi_gbl_copy_dsdt_locally; |
fab46105 | 76 | extern u8 acpi_gbl_create_osi_method; |
d57b23ad | 77 | extern u8 acpi_gbl_disable_auto_repair; |
a94e88cd | 78 | extern u8 acpi_gbl_disable_ssdt_table_install; |
fab46105 | 79 | extern u8 acpi_gbl_do_not_use_xsdt; |
481c1381 | 80 | extern u8 acpi_gbl_enable_aml_debug_object; |
fab46105 LZ |
81 | extern u8 acpi_gbl_enable_interpreter_slack; |
82 | extern u32 acpi_gbl_trace_flags; | |
83 | extern acpi_name acpi_gbl_trace_method_name; | |
84 | extern u8 acpi_gbl_truncate_io_addresses; | |
0249ed24 | 85 | extern u8 acpi_gbl_use32_bit_fadt_addresses; |
fab46105 | 86 | extern u8 acpi_gbl_use_default_register_widths; |
50df4d8b | 87 | |
33620c54 BM |
88 | /* |
89 | * Hardware-reduced prototypes. All interfaces that use these macros will | |
90 | * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag | |
91 | * is set to TRUE. | |
92 | */ | |
93 | #if (!ACPI_REDUCED_HARDWARE) | |
94 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | |
95 | prototype; | |
96 | ||
97 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | |
98 | prototype; | |
99 | ||
100 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | |
101 | prototype; | |
102 | ||
103 | #else | |
104 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | |
105 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} | |
106 | ||
107 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | |
108 | static ACPI_INLINE prototype {return(AE_OK);} | |
109 | ||
110 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | |
c26f3c90 | 111 | static ACPI_INLINE prototype {return;} |
33620c54 BM |
112 | |
113 | #endif /* !ACPI_REDUCED_HARDWARE */ | |
114 | ||
44f6c012 | 115 | /* |
75c8044f | 116 | * Initialization |
1da177e4 | 117 | */ |
45c9f78b | 118 | acpi_status __init |
f3d2e786 BM |
119 | acpi_initialize_tables(struct acpi_table_desc *initial_storage, |
120 | u32 initial_table_count, u8 allow_resize); | |
121 | ||
dd272b57 | 122 | acpi_status __init acpi_initialize_subsystem(void); |
1da177e4 | 123 | |
45c9f78b | 124 | acpi_status __init acpi_enable_subsystem(u32 flags); |
1da177e4 | 125 | |
45c9f78b | 126 | acpi_status __init acpi_initialize_objects(u32 flags); |
1da177e4 | 127 | |
45c9f78b | 128 | acpi_status __init acpi_terminate(void); |
1da177e4 | 129 | |
75c8044f LZ |
130 | /* |
131 | * Miscellaneous global interfaces | |
132 | */ | |
33620c54 BM |
133 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) |
134 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) | |
739dcbb9 | 135 | #ifdef ACPI_FUTURE_USAGE |
ed606944 | 136 | acpi_status acpi_subsystem_status(void); |
739dcbb9 | 137 | #endif |
1da177e4 LT |
138 | |
139 | #ifdef ACPI_FUTURE_USAGE | |
4be44fcd | 140 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); |
1da177e4 LT |
141 | #endif |
142 | ||
9187a415 LZ |
143 | acpi_status acpi_get_statistics(struct acpi_statistics *stats); |
144 | ||
4be44fcd | 145 | const char *acpi_format_exception(acpi_status exception); |
1da177e4 | 146 | |
4be44fcd | 147 | acpi_status acpi_purge_cached_objects(void); |
1da177e4 | 148 | |
b0ed7a91 LM |
149 | acpi_status acpi_install_interface(acpi_string interface_name); |
150 | ||
151 | acpi_status acpi_remove_interface(acpi_string interface_name); | |
152 | ||
2cf9f5bc LZ |
153 | acpi_status acpi_update_interfaces(u8 action); |
154 | ||
f654c0fe LM |
155 | u32 |
156 | acpi_check_address_range(acpi_adr_space_type space_id, | |
157 | acpi_physical_address address, | |
158 | acpi_size length, u8 warn); | |
159 | ||
be030a57 BM |
160 | acpi_status |
161 | acpi_decode_pld_buffer(u8 *in_buffer, | |
162 | acpi_size length, struct acpi_pld_info **return_buffer); | |
163 | ||
1da177e4 | 164 | /* |
f60d8181 | 165 | * ACPI table load/unload interfaces |
1da177e4 | 166 | */ |
caf4a15c LZ |
167 | acpi_status __init |
168 | acpi_install_table(acpi_physical_address address, u8 physical); | |
169 | ||
f60d8181 | 170 | acpi_status acpi_load_table(struct acpi_table_header *table); |
f3d2e786 | 171 | |
f60d8181 | 172 | acpi_status acpi_unload_parent_table(acpi_handle object); |
1da177e4 | 173 | |
45c9f78b | 174 | acpi_status __init acpi_load_tables(void); |
1da177e4 | 175 | |
f60d8181 BM |
176 | /* |
177 | * ACPI table manipulation interfaces | |
178 | */ | |
45c9f78b | 179 | acpi_status __init acpi_reallocate_root_table(void); |
f60d8181 | 180 | |
45c9f78b | 181 | acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address); |
1da177e4 | 182 | |
f3d2e786 | 183 | acpi_status acpi_unload_table_id(acpi_owner_id id); |
1da177e4 LT |
184 | |
185 | acpi_status | |
f3d2e786 | 186 | acpi_get_table_header(acpi_string signature, |
1f86e8c1 | 187 | u32 instance, struct acpi_table_header *out_table_header); |
1da177e4 LT |
188 | |
189 | acpi_status | |
7d97277b YL |
190 | acpi_get_table_with_size(acpi_string signature, |
191 | u32 instance, struct acpi_table_header **out_table, | |
192 | acpi_size *tbl_size); | |
cd27d79f | 193 | |
7d97277b | 194 | acpi_status |
f3d2e786 | 195 | acpi_get_table(acpi_string signature, |
67a119f9 | 196 | u32 instance, struct acpi_table_header **out_table); |
1da177e4 LT |
197 | |
198 | acpi_status | |
1f86e8c1 | 199 | acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table); |
1da177e4 | 200 | |
3e08e2d2 | 201 | acpi_status |
b43e1065 | 202 | acpi_install_table_handler(acpi_table_handler handler, void *context); |
3e08e2d2 | 203 | |
b43e1065 | 204 | acpi_status acpi_remove_table_handler(acpi_table_handler handler); |
3e08e2d2 | 205 | |
1da177e4 LT |
206 | /* |
207 | * Namespace and name interfaces | |
208 | */ | |
1da177e4 | 209 | acpi_status |
4be44fcd LB |
210 | acpi_walk_namespace(acpi_object_type type, |
211 | acpi_handle start_object, | |
212 | u32 max_depth, | |
4ef17507 BM |
213 | acpi_walk_callback descending_callback, |
214 | acpi_walk_callback ascending_callback, | |
4be44fcd | 215 | void *context, void **return_value); |
1da177e4 LT |
216 | |
217 | acpi_status | |
70b30fb1 | 218 | acpi_get_devices(const char *HID, |
4be44fcd LB |
219 | acpi_walk_callback user_function, |
220 | void *context, void **return_value); | |
1da177e4 LT |
221 | |
222 | acpi_status | |
b47cf58e | 223 | acpi_get_name(acpi_handle object, |
4be44fcd | 224 | u32 name_type, struct acpi_buffer *ret_path_ptr); |
1da177e4 LT |
225 | |
226 | acpi_status | |
4be44fcd LB |
227 | acpi_get_handle(acpi_handle parent, |
228 | acpi_string pathname, acpi_handle * ret_handle); | |
1da177e4 LT |
229 | |
230 | acpi_status | |
b47cf58e | 231 | acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data); |
1da177e4 | 232 | |
b47cf58e | 233 | acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); |
1da177e4 | 234 | |
7c2e1771 RW |
235 | acpi_status |
236 | acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, | |
237 | void (*callback)(void *)); | |
238 | ||
1da177e4 | 239 | acpi_status |
b47cf58e | 240 | acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); |
1da177e4 | 241 | |
50eca3eb BM |
242 | acpi_status |
243 | acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); | |
244 | ||
1da177e4 LT |
245 | /* |
246 | * Object manipulation and enumeration | |
247 | */ | |
1da177e4 | 248 | acpi_status |
4be44fcd LB |
249 | acpi_evaluate_object(acpi_handle object, |
250 | acpi_string pathname, | |
251 | struct acpi_object_list *parameter_objects, | |
252 | struct acpi_buffer *return_object_buffer); | |
1da177e4 | 253 | |
1da177e4 | 254 | acpi_status |
4be44fcd LB |
255 | acpi_evaluate_object_typed(acpi_handle object, |
256 | acpi_string pathname, | |
257 | struct acpi_object_list *external_params, | |
258 | struct acpi_buffer *return_buffer, | |
259 | acpi_object_type return_type); | |
1da177e4 LT |
260 | |
261 | acpi_status | |
b47cf58e | 262 | acpi_get_object_info(acpi_handle object, |
15b8dd53 | 263 | struct acpi_device_info **return_buffer); |
1da177e4 | 264 | |
b2f7ddcf LM |
265 | acpi_status acpi_install_method(u8 *buffer); |
266 | ||
1da177e4 | 267 | acpi_status |
4be44fcd LB |
268 | acpi_get_next_object(acpi_object_type type, |
269 | acpi_handle parent, | |
270 | acpi_handle child, acpi_handle * out_handle); | |
1da177e4 | 271 | |
4be44fcd | 272 | acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type); |
1da177e4 | 273 | |
0f0fe1a0 JK |
274 | acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); |
275 | ||
4be44fcd | 276 | acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle); |
1da177e4 LT |
277 | |
278 | /* | |
ecfbbc7b | 279 | * Handler interfaces |
1da177e4 | 280 | */ |
ecfbbc7b BM |
281 | acpi_status |
282 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | |
283 | ||
33620c54 | 284 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
a2fd4b4b LZ |
285 | acpi_install_sci_handler(acpi_sci_handler |
286 | address, | |
287 | void *context)) | |
288 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
289 | acpi_remove_sci_handler(acpi_sci_handler | |
290 | address)) | |
291 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
292 | acpi_install_global_event_handler | |
293 | (acpi_gbl_event_handler handler, | |
294 | void *context)) | |
33620c54 BM |
295 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
296 | acpi_install_fixed_event_handler(u32 | |
297 | acpi_event, | |
298 | acpi_event_handler | |
299 | handler, | |
300 | void | |
301 | *context)) | |
302 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
303 | acpi_remove_fixed_event_handler(u32 acpi_event, | |
304 | acpi_event_handler | |
305 | handler)) | |
306 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
307 | acpi_install_gpe_handler(acpi_handle | |
308 | gpe_device, | |
309 | u32 gpe_number, | |
310 | u32 type, | |
311 | acpi_gpe_handler | |
312 | address, | |
313 | void *context)) | |
314 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
315 | acpi_remove_gpe_handler(acpi_handle gpe_device, | |
316 | u32 gpe_number, | |
317 | acpi_gpe_handler | |
318 | address)) | |
1f86e8c1 | 319 | acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, |
ed606944 LZ |
320 | acpi_notify_handler handler, |
321 | void *context); | |
1da177e4 LT |
322 | |
323 | acpi_status | |
4be44fcd LB |
324 | acpi_remove_notify_handler(acpi_handle device, |
325 | u32 handler_type, acpi_notify_handler handler); | |
1da177e4 LT |
326 | |
327 | acpi_status | |
4be44fcd LB |
328 | acpi_install_address_space_handler(acpi_handle device, |
329 | acpi_adr_space_type space_id, | |
330 | acpi_adr_space_handler handler, | |
331 | acpi_adr_space_setup setup, void *context); | |
1da177e4 LT |
332 | |
333 | acpi_status | |
4be44fcd LB |
334 | acpi_remove_address_space_handler(acpi_handle device, |
335 | acpi_adr_space_type space_id, | |
336 | acpi_adr_space_handler handler); | |
1da177e4 | 337 | |
1da177e4 | 338 | #ifdef ACPI_FUTURE_USAGE |
4be44fcd | 339 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
1da177e4 LT |
340 | #endif |
341 | ||
b0ed7a91 LM |
342 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); |
343 | ||
1da177e4 | 344 | /* |
ffef6827 | 345 | * Global Lock interfaces |
1da177e4 | 346 | */ |
33620c54 BM |
347 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
348 | acpi_acquire_global_lock(u16 timeout, | |
349 | u32 *handle)) | |
cd27d79f | 350 | |
33620c54 BM |
351 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
352 | acpi_release_global_lock(u32 handle)) | |
1da177e4 | 353 | |
ffef6827 LM |
354 | /* |
355 | * Interfaces to AML mutex objects | |
356 | */ | |
357 | acpi_status | |
358 | acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); | |
359 | ||
360 | acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); | |
361 | ||
362 | /* | |
363 | * Fixed Event interfaces | |
364 | */ | |
33620c54 BM |
365 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
366 | acpi_enable_event(u32 event, u32 flags)) | |
1da177e4 | 367 | |
33620c54 BM |
368 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
369 | acpi_disable_event(u32 event, u32 flags)) | |
33620c54 | 370 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) |
1da177e4 | 371 | |
33620c54 BM |
372 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
373 | acpi_get_event_status(u32 event, | |
374 | acpi_event_status | |
375 | *event_status)) | |
cd27d79f | 376 | |
08ac07b8 | 377 | /* |
ffef6827 | 378 | * General Purpose Event (GPE) Interfaces |
08ac07b8 | 379 | */ |
33620c54 BM |
380 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) |
381 | ||
382 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
383 | acpi_enable_gpe(acpi_handle gpe_device, | |
384 | u32 gpe_number)) | |
385 | ||
386 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
387 | acpi_disable_gpe(acpi_handle gpe_device, | |
388 | u32 gpe_number)) | |
389 | ||
390 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
391 | acpi_clear_gpe(acpi_handle gpe_device, | |
392 | u32 gpe_number)) | |
393 | ||
394 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
395 | acpi_set_gpe(acpi_handle gpe_device, | |
396 | u32 gpe_number, u8 action)) | |
397 | ||
398 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
399 | acpi_finish_gpe(acpi_handle gpe_device, | |
400 | u32 gpe_number)) | |
401 | ||
402 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
403 | acpi_setup_gpe_for_wake(acpi_handle | |
404 | parent_device, | |
405 | acpi_handle gpe_device, | |
406 | u32 gpe_number)) | |
407 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
408 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, | |
409 | u32 gpe_number, | |
410 | u8 action)) | |
411 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
412 | acpi_get_gpe_status(acpi_handle gpe_device, | |
413 | u32 gpe_number, | |
414 | acpi_event_status | |
415 | *event_status)) | |
33620c54 | 416 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) |
33620c54 BM |
417 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) |
418 | ||
419 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
420 | acpi_get_gpe_device(u32 gpe_index, | |
421 | acpi_handle * gpe_device)) | |
422 | ||
423 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
424 | acpi_install_gpe_block(acpi_handle gpe_device, | |
425 | struct | |
426 | acpi_generic_address | |
427 | *gpe_block_address, | |
428 | u32 register_count, | |
429 | u32 interrupt_number)) | |
430 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
431 | acpi_remove_gpe_block(acpi_handle gpe_device)) | |
a2100801 | 432 | |
1da177e4 LT |
433 | /* |
434 | * Resource interfaces | |
435 | */ | |
1da177e4 | 436 | typedef |
61686124 | 437 | acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, |
4be44fcd | 438 | void *context); |
1da177e4 | 439 | |
c51a4de8 | 440 | acpi_status |
b47cf58e | 441 | acpi_get_vendor_resource(acpi_handle device, |
c51a4de8 BM |
442 | char *name, |
443 | struct acpi_vendor_uuid *uuid, | |
444 | struct acpi_buffer *ret_buffer); | |
445 | ||
1da177e4 | 446 | acpi_status |
b47cf58e | 447 | acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
448 | |
449 | #ifdef ACPI_FUTURE_USAGE | |
450 | acpi_status | |
b47cf58e | 451 | acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
452 | #endif |
453 | ||
a91cdde2 BM |
454 | acpi_status |
455 | acpi_get_event_resources(acpi_handle device_handle, | |
456 | struct acpi_buffer *ret_buffer); | |
457 | ||
afb1bbee BM |
458 | acpi_status |
459 | acpi_walk_resource_buffer(struct acpi_buffer *buffer, | |
460 | acpi_walk_resource_callback user_function, | |
461 | void *context); | |
462 | ||
1da177e4 | 463 | acpi_status |
b47cf58e | 464 | acpi_walk_resources(acpi_handle device, |
c51a4de8 | 465 | char *name, |
61686124 | 466 | acpi_walk_resource_callback user_function, void *context); |
1da177e4 LT |
467 | |
468 | acpi_status | |
b47cf58e | 469 | acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer); |
1da177e4 LT |
470 | |
471 | acpi_status | |
b47cf58e | 472 | acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
473 | |
474 | acpi_status | |
4be44fcd LB |
475 | acpi_resource_to_address64(struct acpi_resource *resource, |
476 | struct acpi_resource_address64 *out); | |
1da177e4 | 477 | |
0e243178 BM |
478 | acpi_status |
479 | acpi_buffer_to_resource(u8 *aml_buffer, | |
480 | u16 aml_buffer_length, | |
481 | struct acpi_resource **resource_ptr); | |
482 | ||
1da177e4 LT |
483 | /* |
484 | * Hardware (ACPI device) interfaces | |
485 | */ | |
d3fd902d BM |
486 | acpi_status acpi_reset(void); |
487 | ||
739dcbb9 LZ |
488 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); |
489 | ||
490 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); | |
491 | ||
33620c54 BM |
492 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
493 | acpi_read_bit_register(u32 register_id, | |
494 | u32 *return_value)) | |
1da177e4 | 495 | |
33620c54 BM |
496 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
497 | acpi_write_bit_register(u32 register_id, | |
498 | u32 value)) | |
1da177e4 | 499 | |
33620c54 BM |
500 | /* |
501 | * Sleep/Wake interfaces | |
502 | */ | |
1da177e4 | 503 | acpi_status |
cd27d79f | 504 | acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b); |
1da177e4 | 505 | |
4be44fcd | 506 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
1da177e4 | 507 | |
40bce100 | 508 | acpi_status acpi_enter_sleep_state(u8 sleep_state); |
1da177e4 | 509 | |
40bce100 | 510 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void)) |
1da177e4 | 511 | |
3f6f49c7 | 512 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
c95d47a8 | 513 | |
4be44fcd | 514 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
1da177e4 | 515 | |
739dcbb9 LZ |
516 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
517 | acpi_set_firmware_waking_vector(u32 | |
518 | physical_address)) | |
739dcbb9 LZ |
519 | #if ACPI_MACHINE_WIDTH == 64 |
520 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
521 | acpi_set_firmware_waking_vector64(u64 | |
522 | physical_address)) | |
523 | #endif | |
d08310fe BM |
524 | /* |
525 | * ACPI Timer interfaces | |
526 | */ | |
527 | #ifdef ACPI_FUTURE_USAGE | |
33620c54 BM |
528 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
529 | acpi_get_timer_resolution(u32 *resolution)) | |
33620c54 | 530 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) |
d08310fe | 531 | |
33620c54 BM |
532 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
533 | acpi_get_timer_duration(u32 start_ticks, | |
534 | u32 end_ticks, | |
535 | u32 *time_elapsed)) | |
d08310fe BM |
536 | #endif /* ACPI_FUTURE_USAGE */ |
537 | ||
50df4d8b | 538 | /* |
b74be611 | 539 | * Error/Warning output |
50df4d8b | 540 | */ |
4506bf23 | 541 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 542 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 543 | acpi_error(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 544 | |
4506bf23 | 545 | ACPI_PRINTF_LIKE(4) |
50df4d8b BM |
546 | void ACPI_INTERNAL_VAR_XFACE |
547 | acpi_exception(const char *module_name, | |
4506bf23 | 548 | u32 line_number, acpi_status status, const char *format, ...); |
50df4d8b | 549 | |
4506bf23 | 550 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 551 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 552 | acpi_warning(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 553 | |
4506bf23 | 554 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 555 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 556 | acpi_info(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 557 | |
4506bf23 | 558 | ACPI_PRINTF_LIKE(3) |
62cdd141 BM |
559 | void ACPI_INTERNAL_VAR_XFACE |
560 | acpi_bios_error(const char *module_name, | |
4506bf23 | 561 | u32 line_number, const char *format, ...); |
62cdd141 | 562 | |
4506bf23 | 563 | ACPI_PRINTF_LIKE(3) |
62cdd141 BM |
564 | void ACPI_INTERNAL_VAR_XFACE |
565 | acpi_bios_warning(const char *module_name, | |
4506bf23 | 566 | u32 line_number, const char *format, ...); |
62cdd141 | 567 | |
b74be611 BM |
568 | /* |
569 | * Debug output | |
570 | */ | |
50df4d8b BM |
571 | #ifdef ACPI_DEBUG_OUTPUT |
572 | ||
4506bf23 | 573 | ACPI_PRINTF_LIKE(6) |
50df4d8b BM |
574 | void ACPI_INTERNAL_VAR_XFACE |
575 | acpi_debug_print(u32 requested_debug_level, | |
576 | u32 line_number, | |
577 | const char *function_name, | |
578 | const char *module_name, | |
4506bf23 | 579 | u32 component_id, const char *format, ...); |
50df4d8b | 580 | |
4506bf23 | 581 | ACPI_PRINTF_LIKE(6) |
50df4d8b BM |
582 | void ACPI_INTERNAL_VAR_XFACE |
583 | acpi_debug_print_raw(u32 requested_debug_level, | |
584 | u32 line_number, | |
585 | const char *function_name, | |
586 | const char *module_name, | |
4506bf23 | 587 | u32 component_id, const char *format, ...); |
50df4d8b BM |
588 | #endif |
589 | ||
4be44fcd | 590 | #endif /* __ACXFACE_H__ */ |