]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /****************************************************************************** |
2 | * | |
3 | * Name: acpixf.h - External interfaces to the ACPI subsystem | |
4 | * | |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
25f044e6 | 8 | * Copyright (C) 2000 - 2013, 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 | ||
affffae3 | 49 | #define ACPI_CA_VERSION 0x20130927 |
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 | 56 | extern u8 acpi_gbl_permanent_mmap; |
cd27d79f | 57 | extern u32 acpi_rsdt_forced; |
889c78be | 58 | |
50df4d8b | 59 | /* |
75c8044f | 60 | * Globals that are publically available |
50df4d8b | 61 | */ |
739dcbb9 LZ |
62 | extern u32 acpi_current_gpe_count; |
63 | extern struct acpi_table_fadt acpi_gbl_FADT; | |
64 | extern u8 acpi_gbl_system_awake_and_running; | |
65 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ | |
242b2287 | 66 | extern u8 acpi_gbl_osi_data; |
3e8214e5 | 67 | |
75c8044f | 68 | /* Runtime configuration of debug print levels */ |
3e8214e5 | 69 | |
50df4d8b BM |
70 | extern u32 acpi_dbg_level; |
71 | extern u32 acpi_dbg_layer; | |
3e8214e5 | 72 | |
75c8044f | 73 | /* ACPICA runtime options */ |
3e8214e5 | 74 | |
50df4d8b BM |
75 | extern u8 acpi_gbl_enable_interpreter_slack; |
76 | extern u8 acpi_gbl_all_methods_serialized; | |
77 | extern u8 acpi_gbl_create_osi_method; | |
f8d80cdf | 78 | extern u8 acpi_gbl_use_default_register_widths; |
50df4d8b BM |
79 | extern acpi_name acpi_gbl_trace_method_name; |
80 | extern u32 acpi_gbl_trace_flags; | |
90ab5ee9 | 81 | extern bool acpi_gbl_enable_aml_debug_object; |
69ec87ef | 82 | extern u8 acpi_gbl_copy_dsdt_locally; |
b681f7d9 | 83 | extern u8 acpi_gbl_truncate_io_addresses; |
d57b23ad | 84 | extern u8 acpi_gbl_disable_auto_repair; |
b75dd297 | 85 | extern u8 acpi_gbl_disable_ssdt_table_load; |
50df4d8b | 86 | |
33620c54 BM |
87 | /* |
88 | * Hardware-reduced prototypes. All interfaces that use these macros will | |
89 | * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag | |
90 | * is set to TRUE. | |
91 | */ | |
92 | #if (!ACPI_REDUCED_HARDWARE) | |
93 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | |
94 | prototype; | |
95 | ||
96 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | |
97 | prototype; | |
98 | ||
99 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | |
100 | prototype; | |
101 | ||
102 | #else | |
103 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | |
104 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} | |
105 | ||
106 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | |
107 | static ACPI_INLINE prototype {return(AE_OK);} | |
108 | ||
109 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | |
c26f3c90 | 110 | static ACPI_INLINE prototype {return;} |
33620c54 BM |
111 | |
112 | #endif /* !ACPI_REDUCED_HARDWARE */ | |
113 | ||
44f6c012 | 114 | /* |
75c8044f | 115 | * Initialization |
1da177e4 | 116 | */ |
f3d2e786 BM |
117 | acpi_status |
118 | acpi_initialize_tables(struct acpi_table_desc *initial_storage, | |
119 | u32 initial_table_count, u8 allow_resize); | |
120 | ||
dd272b57 | 121 | acpi_status __init acpi_initialize_subsystem(void); |
1da177e4 | 122 | |
4be44fcd | 123 | acpi_status acpi_enable_subsystem(u32 flags); |
1da177e4 | 124 | |
4be44fcd | 125 | acpi_status acpi_initialize_objects(u32 flags); |
1da177e4 | 126 | |
4be44fcd | 127 | acpi_status acpi_terminate(void); |
1da177e4 | 128 | |
75c8044f LZ |
129 | /* |
130 | * Miscellaneous global interfaces | |
131 | */ | |
33620c54 | 132 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) |
cd27d79f | 133 | |
33620c54 | 134 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) |
739dcbb9 | 135 | #ifdef ACPI_FUTURE_USAGE |
cd27d79f | 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 | ||
4be44fcd | 143 | const char *acpi_format_exception(acpi_status exception); |
1da177e4 | 144 | |
4be44fcd | 145 | acpi_status acpi_purge_cached_objects(void); |
1da177e4 | 146 | |
b0ed7a91 LM |
147 | acpi_status acpi_install_interface(acpi_string interface_name); |
148 | ||
149 | acpi_status acpi_remove_interface(acpi_string interface_name); | |
150 | ||
2cf9f5bc LZ |
151 | acpi_status acpi_update_interfaces(u8 action); |
152 | ||
f654c0fe LM |
153 | u32 |
154 | acpi_check_address_range(acpi_adr_space_type space_id, | |
155 | acpi_physical_address address, | |
156 | acpi_size length, u8 warn); | |
157 | ||
be030a57 BM |
158 | acpi_status |
159 | acpi_decode_pld_buffer(u8 *in_buffer, | |
160 | acpi_size length, struct acpi_pld_info **return_buffer); | |
161 | ||
1da177e4 | 162 | /* |
f60d8181 | 163 | * ACPI table load/unload interfaces |
1da177e4 | 164 | */ |
f60d8181 | 165 | acpi_status acpi_load_table(struct acpi_table_header *table); |
f3d2e786 | 166 | |
f60d8181 | 167 | acpi_status acpi_unload_parent_table(acpi_handle object); |
1da177e4 | 168 | |
4be44fcd | 169 | acpi_status acpi_load_tables(void); |
1da177e4 | 170 | |
f60d8181 BM |
171 | /* |
172 | * ACPI table manipulation interfaces | |
173 | */ | |
174 | acpi_status acpi_reallocate_root_table(void); | |
175 | ||
cd27d79f | 176 | acpi_status acpi_find_root_pointer(acpi_size * rsdp_address); |
1da177e4 | 177 | |
f3d2e786 | 178 | acpi_status acpi_unload_table_id(acpi_owner_id id); |
1da177e4 LT |
179 | |
180 | acpi_status | |
f3d2e786 | 181 | acpi_get_table_header(acpi_string signature, |
1f86e8c1 | 182 | u32 instance, struct acpi_table_header *out_table_header); |
1da177e4 LT |
183 | |
184 | acpi_status | |
7d97277b YL |
185 | acpi_get_table_with_size(acpi_string signature, |
186 | u32 instance, struct acpi_table_header **out_table, | |
187 | acpi_size *tbl_size); | |
cd27d79f | 188 | |
7d97277b | 189 | acpi_status |
f3d2e786 | 190 | acpi_get_table(acpi_string signature, |
67a119f9 | 191 | u32 instance, struct acpi_table_header **out_table); |
1da177e4 LT |
192 | |
193 | acpi_status | |
1f86e8c1 | 194 | acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table); |
1da177e4 | 195 | |
3e08e2d2 | 196 | acpi_status |
b43e1065 | 197 | acpi_install_table_handler(acpi_table_handler handler, void *context); |
3e08e2d2 | 198 | |
b43e1065 | 199 | acpi_status acpi_remove_table_handler(acpi_table_handler handler); |
3e08e2d2 | 200 | |
1da177e4 LT |
201 | /* |
202 | * Namespace and name interfaces | |
203 | */ | |
1da177e4 | 204 | acpi_status |
4be44fcd LB |
205 | acpi_walk_namespace(acpi_object_type type, |
206 | acpi_handle start_object, | |
207 | u32 max_depth, | |
4ef17507 BM |
208 | acpi_walk_callback descending_callback, |
209 | acpi_walk_callback ascending_callback, | |
4be44fcd | 210 | void *context, void **return_value); |
1da177e4 LT |
211 | |
212 | acpi_status | |
70b30fb1 | 213 | acpi_get_devices(const char *HID, |
4be44fcd LB |
214 | acpi_walk_callback user_function, |
215 | void *context, void **return_value); | |
1da177e4 LT |
216 | |
217 | acpi_status | |
b47cf58e | 218 | acpi_get_name(acpi_handle object, |
4be44fcd | 219 | u32 name_type, struct acpi_buffer *ret_path_ptr); |
1da177e4 LT |
220 | |
221 | acpi_status | |
4be44fcd LB |
222 | acpi_get_handle(acpi_handle parent, |
223 | acpi_string pathname, acpi_handle * ret_handle); | |
1da177e4 LT |
224 | |
225 | acpi_status | |
b47cf58e | 226 | acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data); |
1da177e4 | 227 | |
b47cf58e | 228 | acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); |
1da177e4 LT |
229 | |
230 | acpi_status | |
b47cf58e | 231 | acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); |
1da177e4 | 232 | |
50eca3eb BM |
233 | acpi_status |
234 | acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); | |
235 | ||
1da177e4 LT |
236 | /* |
237 | * Object manipulation and enumeration | |
238 | */ | |
1da177e4 | 239 | acpi_status |
4be44fcd LB |
240 | acpi_evaluate_object(acpi_handle object, |
241 | acpi_string pathname, | |
242 | struct acpi_object_list *parameter_objects, | |
243 | struct acpi_buffer *return_object_buffer); | |
1da177e4 | 244 | |
1da177e4 | 245 | acpi_status |
4be44fcd LB |
246 | acpi_evaluate_object_typed(acpi_handle object, |
247 | acpi_string pathname, | |
248 | struct acpi_object_list *external_params, | |
249 | struct acpi_buffer *return_buffer, | |
250 | acpi_object_type return_type); | |
1da177e4 LT |
251 | |
252 | acpi_status | |
b47cf58e | 253 | acpi_get_object_info(acpi_handle object, |
15b8dd53 | 254 | struct acpi_device_info **return_buffer); |
1da177e4 | 255 | |
b2f7ddcf LM |
256 | acpi_status acpi_install_method(u8 *buffer); |
257 | ||
1da177e4 | 258 | acpi_status |
4be44fcd LB |
259 | acpi_get_next_object(acpi_object_type type, |
260 | acpi_handle parent, | |
261 | acpi_handle child, acpi_handle * out_handle); | |
1da177e4 | 262 | |
4be44fcd | 263 | acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type); |
1da177e4 | 264 | |
0f0fe1a0 JK |
265 | acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); |
266 | ||
4be44fcd | 267 | acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle); |
1da177e4 LT |
268 | |
269 | /* | |
ecfbbc7b | 270 | * Handler interfaces |
1da177e4 | 271 | */ |
ecfbbc7b BM |
272 | acpi_status |
273 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | |
274 | ||
33620c54 | 275 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
a2fd4b4b LZ |
276 | acpi_install_sci_handler(acpi_sci_handler |
277 | address, | |
278 | void *context)) | |
cd27d79f | 279 | |
a2fd4b4b LZ |
280 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
281 | acpi_remove_sci_handler(acpi_sci_handler | |
282 | address)) | |
cd27d79f | 283 | |
a2fd4b4b LZ |
284 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
285 | acpi_install_global_event_handler | |
286 | (acpi_gbl_event_handler handler, | |
287 | void *context)) | |
cd27d79f | 288 | |
33620c54 BM |
289 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
290 | acpi_install_fixed_event_handler(u32 | |
291 | acpi_event, | |
292 | acpi_event_handler | |
293 | handler, | |
294 | void | |
295 | *context)) | |
cd27d79f | 296 | |
33620c54 BM |
297 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
298 | acpi_remove_fixed_event_handler(u32 acpi_event, | |
299 | acpi_event_handler | |
300 | handler)) | |
cd27d79f | 301 | |
33620c54 BM |
302 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
303 | acpi_install_gpe_handler(acpi_handle | |
304 | gpe_device, | |
305 | u32 gpe_number, | |
306 | u32 type, | |
307 | acpi_gpe_handler | |
308 | address, | |
309 | void *context)) | |
cd27d79f | 310 | |
33620c54 BM |
311 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
312 | acpi_remove_gpe_handler(acpi_handle gpe_device, | |
313 | u32 gpe_number, | |
314 | acpi_gpe_handler | |
315 | address)) | |
1f86e8c1 LZ |
316 | acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, |
317 | acpi_notify_handler handler, | |
318 | void *context); | |
1da177e4 LT |
319 | |
320 | acpi_status | |
4be44fcd LB |
321 | acpi_remove_notify_handler(acpi_handle device, |
322 | u32 handler_type, acpi_notify_handler handler); | |
1da177e4 LT |
323 | |
324 | acpi_status | |
4be44fcd LB |
325 | acpi_install_address_space_handler(acpi_handle device, |
326 | acpi_adr_space_type space_id, | |
327 | acpi_adr_space_handler handler, | |
328 | acpi_adr_space_setup setup, void *context); | |
1da177e4 LT |
329 | |
330 | acpi_status | |
4be44fcd LB |
331 | acpi_remove_address_space_handler(acpi_handle device, |
332 | acpi_adr_space_type space_id, | |
333 | acpi_adr_space_handler handler); | |
1da177e4 | 334 | |
1da177e4 | 335 | #ifdef ACPI_FUTURE_USAGE |
4be44fcd | 336 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
1da177e4 LT |
337 | #endif |
338 | ||
b0ed7a91 LM |
339 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); |
340 | ||
1da177e4 | 341 | /* |
ffef6827 | 342 | * Global Lock interfaces |
1da177e4 | 343 | */ |
33620c54 BM |
344 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
345 | acpi_acquire_global_lock(u16 timeout, | |
346 | u32 *handle)) | |
cd27d79f | 347 | |
33620c54 BM |
348 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
349 | acpi_release_global_lock(u32 handle)) | |
1da177e4 | 350 | |
ffef6827 LM |
351 | /* |
352 | * Interfaces to AML mutex objects | |
353 | */ | |
354 | acpi_status | |
355 | acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); | |
356 | ||
357 | acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); | |
358 | ||
359 | /* | |
360 | * Fixed Event interfaces | |
361 | */ | |
33620c54 BM |
362 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
363 | acpi_enable_event(u32 event, u32 flags)) | |
1da177e4 | 364 | |
33620c54 BM |
365 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
366 | acpi_disable_event(u32 event, u32 flags)) | |
1da177e4 | 367 | |
33620c54 | 368 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) |
1da177e4 | 369 | |
33620c54 BM |
370 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
371 | acpi_get_event_status(u32 event, | |
372 | acpi_event_status | |
373 | *event_status)) | |
cd27d79f | 374 | |
08ac07b8 | 375 | /* |
ffef6827 | 376 | * General Purpose Event (GPE) Interfaces |
08ac07b8 | 377 | */ |
33620c54 BM |
378 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) |
379 | ||
380 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
381 | acpi_enable_gpe(acpi_handle gpe_device, | |
382 | u32 gpe_number)) | |
383 | ||
384 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
385 | acpi_disable_gpe(acpi_handle gpe_device, | |
386 | u32 gpe_number)) | |
387 | ||
388 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
389 | acpi_clear_gpe(acpi_handle gpe_device, | |
390 | u32 gpe_number)) | |
391 | ||
392 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
393 | acpi_set_gpe(acpi_handle gpe_device, | |
394 | u32 gpe_number, u8 action)) | |
395 | ||
396 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
397 | acpi_finish_gpe(acpi_handle gpe_device, | |
398 | u32 gpe_number)) | |
399 | ||
400 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
401 | acpi_setup_gpe_for_wake(acpi_handle | |
402 | parent_device, | |
403 | acpi_handle gpe_device, | |
404 | u32 gpe_number)) | |
cd27d79f | 405 | |
33620c54 BM |
406 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
407 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, | |
408 | u32 gpe_number, | |
409 | u8 action)) | |
cd27d79f | 410 | |
33620c54 BM |
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)) | |
416 | ||
417 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) | |
418 | ||
419 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) | |
420 | ||
421 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
422 | acpi_get_gpe_device(u32 gpe_index, | |
423 | acpi_handle * gpe_device)) | |
424 | ||
425 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
426 | acpi_install_gpe_block(acpi_handle gpe_device, | |
427 | struct | |
428 | acpi_generic_address | |
429 | *gpe_block_address, | |
430 | u32 register_count, | |
431 | u32 interrupt_number)) | |
cd27d79f | 432 | |
33620c54 BM |
433 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
434 | acpi_remove_gpe_block(acpi_handle gpe_device)) | |
a2100801 | 435 | |
1da177e4 LT |
436 | /* |
437 | * Resource interfaces | |
438 | */ | |
1da177e4 | 439 | typedef |
61686124 | 440 | acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, |
4be44fcd | 441 | void *context); |
1da177e4 | 442 | |
c51a4de8 | 443 | acpi_status |
b47cf58e | 444 | acpi_get_vendor_resource(acpi_handle device, |
c51a4de8 BM |
445 | char *name, |
446 | struct acpi_vendor_uuid *uuid, | |
447 | struct acpi_buffer *ret_buffer); | |
448 | ||
1da177e4 | 449 | acpi_status |
b47cf58e | 450 | acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
451 | |
452 | #ifdef ACPI_FUTURE_USAGE | |
453 | acpi_status | |
b47cf58e | 454 | acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
455 | #endif |
456 | ||
a91cdde2 BM |
457 | acpi_status |
458 | acpi_get_event_resources(acpi_handle device_handle, | |
459 | struct acpi_buffer *ret_buffer); | |
460 | ||
afb1bbee BM |
461 | acpi_status |
462 | acpi_walk_resource_buffer(struct acpi_buffer *buffer, | |
463 | acpi_walk_resource_callback user_function, | |
464 | void *context); | |
465 | ||
1da177e4 | 466 | acpi_status |
b47cf58e | 467 | acpi_walk_resources(acpi_handle device, |
c51a4de8 | 468 | char *name, |
61686124 | 469 | acpi_walk_resource_callback user_function, void *context); |
1da177e4 LT |
470 | |
471 | acpi_status | |
b47cf58e | 472 | acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer); |
1da177e4 LT |
473 | |
474 | acpi_status | |
b47cf58e | 475 | acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer); |
1da177e4 LT |
476 | |
477 | acpi_status | |
4be44fcd LB |
478 | acpi_resource_to_address64(struct acpi_resource *resource, |
479 | struct acpi_resource_address64 *out); | |
1da177e4 | 480 | |
0e243178 BM |
481 | acpi_status |
482 | acpi_buffer_to_resource(u8 *aml_buffer, | |
483 | u16 aml_buffer_length, | |
484 | struct acpi_resource **resource_ptr); | |
485 | ||
1da177e4 LT |
486 | /* |
487 | * Hardware (ACPI device) interfaces | |
488 | */ | |
d3fd902d BM |
489 | acpi_status acpi_reset(void); |
490 | ||
739dcbb9 LZ |
491 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); |
492 | ||
493 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); | |
494 | ||
33620c54 BM |
495 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
496 | acpi_read_bit_register(u32 register_id, | |
497 | u32 *return_value)) | |
1da177e4 | 498 | |
33620c54 BM |
499 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
500 | acpi_write_bit_register(u32 register_id, | |
501 | u32 value)) | |
1da177e4 | 502 | |
33620c54 BM |
503 | /* |
504 | * Sleep/Wake interfaces | |
505 | */ | |
1da177e4 | 506 | acpi_status |
cd27d79f | 507 | acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b); |
1da177e4 | 508 | |
4be44fcd | 509 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
1da177e4 | 510 | |
3f6f49c7 | 511 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); |
1da177e4 | 512 | |
33620c54 | 513 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) |
1da177e4 | 514 | |
3f6f49c7 | 515 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
c95d47a8 | 516 | |
4be44fcd | 517 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
1da177e4 | 518 | |
739dcbb9 LZ |
519 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
520 | acpi_set_firmware_waking_vector(u32 | |
521 | physical_address)) | |
739dcbb9 LZ |
522 | #if ACPI_MACHINE_WIDTH == 64 |
523 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |
524 | acpi_set_firmware_waking_vector64(u64 | |
525 | physical_address)) | |
526 | #endif | |
d08310fe BM |
527 | /* |
528 | * ACPI Timer interfaces | |
529 | */ | |
530 | #ifdef ACPI_FUTURE_USAGE | |
33620c54 BM |
531 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
532 | acpi_get_timer_resolution(u32 *resolution)) | |
d08310fe | 533 | |
33620c54 | 534 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) |
d08310fe | 535 | |
33620c54 BM |
536 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
537 | acpi_get_timer_duration(u32 start_ticks, | |
538 | u32 end_ticks, | |
539 | u32 *time_elapsed)) | |
d08310fe BM |
540 | #endif /* ACPI_FUTURE_USAGE */ |
541 | ||
50df4d8b | 542 | /* |
b74be611 | 543 | * Error/Warning output |
50df4d8b | 544 | */ |
4506bf23 | 545 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 546 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 547 | acpi_error(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 548 | |
4506bf23 | 549 | ACPI_PRINTF_LIKE(4) |
50df4d8b BM |
550 | void ACPI_INTERNAL_VAR_XFACE |
551 | acpi_exception(const char *module_name, | |
4506bf23 | 552 | u32 line_number, acpi_status status, const char *format, ...); |
50df4d8b | 553 | |
4506bf23 | 554 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 555 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 556 | acpi_warning(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 557 | |
4506bf23 | 558 | ACPI_PRINTF_LIKE(3) |
50df4d8b | 559 | void ACPI_INTERNAL_VAR_XFACE |
4506bf23 | 560 | acpi_info(const char *module_name, u32 line_number, const char *format, ...); |
50df4d8b | 561 | |
4506bf23 | 562 | ACPI_PRINTF_LIKE(3) |
62cdd141 BM |
563 | void ACPI_INTERNAL_VAR_XFACE |
564 | acpi_bios_error(const char *module_name, | |
4506bf23 | 565 | u32 line_number, const char *format, ...); |
62cdd141 | 566 | |
4506bf23 | 567 | ACPI_PRINTF_LIKE(3) |
62cdd141 BM |
568 | void ACPI_INTERNAL_VAR_XFACE |
569 | acpi_bios_warning(const char *module_name, | |
4506bf23 | 570 | u32 line_number, const char *format, ...); |
62cdd141 | 571 | |
b74be611 BM |
572 | /* |
573 | * Debug output | |
574 | */ | |
50df4d8b BM |
575 | #ifdef ACPI_DEBUG_OUTPUT |
576 | ||
4506bf23 | 577 | ACPI_PRINTF_LIKE(6) |
50df4d8b BM |
578 | void ACPI_INTERNAL_VAR_XFACE |
579 | acpi_debug_print(u32 requested_debug_level, | |
580 | u32 line_number, | |
581 | const char *function_name, | |
582 | const char *module_name, | |
4506bf23 | 583 | u32 component_id, const char *format, ...); |
50df4d8b | 584 | |
4506bf23 | 585 | ACPI_PRINTF_LIKE(6) |
50df4d8b BM |
586 | void ACPI_INTERNAL_VAR_XFACE |
587 | acpi_debug_print_raw(u32 requested_debug_level, | |
588 | u32 line_number, | |
589 | const char *function_name, | |
590 | const char *module_name, | |
4506bf23 | 591 | u32 component_id, const char *format, ...); |
50df4d8b BM |
592 | #endif |
593 | ||
4be44fcd | 594 | #endif /* __ACXFACE_H__ */ |