Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Name: acpixf.h - External interfaces to the ACPI subsystem |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
Bob Moore | fbb7a2d | 2014-02-08 09:42:25 +0800 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2014, Intel Corp. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #ifndef __ACXFACE_H__ |
| 45 | #define __ACXFACE_H__ |
| 46 | |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 48 | |
Bob Moore | 35476c7 | 2014-04-04 12:40:16 +0800 | [diff] [blame] | 49 | #define ACPI_CA_VERSION 0x20140325 |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 50 | |
David Howells | a1ce392 | 2012-10-02 18:01:25 +0100 | [diff] [blame] | 51 | #include <acpi/acconfig.h> |
| 52 | #include <acpi/actypes.h> |
| 53 | #include <acpi/actbl.h> |
Linus Torvalds | d8dc91b | 2012-10-08 07:14:06 +0900 | [diff] [blame] | 54 | #include <acpi/acbuffer.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
Lin Ming | 889c78b | 2008-12-31 09:23:57 +0800 | [diff] [blame] | 56 | extern u8 acpi_gbl_permanent_mmap; |
| 57 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 58 | /* |
Lv Zheng | 3035ff7 | 2014-04-30 10:03:52 +0800 | [diff] [blame] | 59 | * Ensure that the globals are actually defined and initialized only once. |
| 60 | * |
| 61 | * The use of these macros allows a single list of globals (here) in order |
| 62 | * to simplify maintenance of the code. |
| 63 | */ |
| 64 | #ifdef DEFINE_ACPI_GLOBALS |
| 65 | #define ACPI_GLOBAL(type,name) \ |
| 66 | extern type name; \ |
| 67 | type name |
| 68 | |
| 69 | #define ACPI_INIT_GLOBAL(type,name,value) \ |
| 70 | type name=value |
| 71 | |
| 72 | #else |
| 73 | #ifndef ACPI_GLOBAL |
| 74 | #define ACPI_GLOBAL(type,name) \ |
| 75 | extern type name |
| 76 | #endif |
| 77 | |
| 78 | #ifndef ACPI_INIT_GLOBAL |
| 79 | #define ACPI_INIT_GLOBAL(type,name,value) \ |
| 80 | extern type name |
| 81 | #endif |
| 82 | #endif |
| 83 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 84 | /* ACPICA prototypes */ |
| 85 | |
| 86 | #ifndef ACPI_EXTERNAL_RETURN_STATUS |
| 87 | #define ACPI_EXTERNAL_RETURN_STATUS(prototype) \ |
| 88 | prototype; |
| 89 | #endif |
| 90 | |
| 91 | #ifndef ACPI_EXTERNAL_RETURN_OK |
| 92 | #define ACPI_EXTERNAL_RETURN_OK(prototype) \ |
| 93 | prototype; |
| 94 | #endif |
| 95 | |
| 96 | #ifndef ACPI_EXTERNAL_RETURN_VOID |
| 97 | #define ACPI_EXTERNAL_RETURN_VOID(prototype) \ |
| 98 | prototype; |
| 99 | #endif |
| 100 | |
| 101 | #ifndef ACPI_EXTERNAL_RETURN_UINT32 |
| 102 | #define ACPI_EXTERNAL_RETURN_UINT32(prototype) \ |
| 103 | prototype; |
| 104 | #endif |
| 105 | |
| 106 | #ifndef ACPI_EXTERNAL_RETURN_PTR |
| 107 | #define ACPI_EXTERNAL_RETURN_PTR(prototype) \ |
| 108 | prototype; |
| 109 | #endif |
| 110 | |
Lv Zheng | 3035ff7 | 2014-04-30 10:03:52 +0800 | [diff] [blame] | 111 | /* Public globals, available from outside ACPICA subsystem */ |
| 112 | |
| 113 | /***************************************************************************** |
| 114 | * |
| 115 | * Runtime configuration (static defaults that can be overriden at runtime) |
| 116 | * |
| 117 | ****************************************************************************/ |
| 118 | |
| 119 | /* |
| 120 | * Enable "slack" in the AML interpreter? Default is FALSE, and the |
| 121 | * interpreter strictly follows the ACPI specification. Setting to TRUE |
| 122 | * allows the interpreter to ignore certain errors and/or bad AML constructs. |
| 123 | * |
| 124 | * Currently, these features are enabled by this flag: |
| 125 | * |
| 126 | * 1) Allow "implicit return" of last value in a control method |
| 127 | * 2) Allow access beyond the end of an operation region |
| 128 | * 3) Allow access to uninitialized locals/args (auto-init to integer 0) |
| 129 | * 4) Allow ANY object type to be a source operand for the Store() operator |
| 130 | * 5) Allow unresolved references (invalid target name) in package objects |
| 131 | * 6) Enable warning messages for behavior that is not ACPI spec compliant |
| 132 | */ |
| 133 | ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE); |
| 134 | |
| 135 | /* |
| 136 | * Automatically serialize all methods that create named objects? Default |
| 137 | * is TRUE, meaning that all non_serialized methods are scanned once at |
| 138 | * table load time to determine those that create named objects. Methods |
| 139 | * that create named objects are marked Serialized in order to prevent |
| 140 | * possible run-time problems if they are entered by more than one thread. |
| 141 | */ |
| 142 | ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE); |
| 143 | |
| 144 | /* |
| 145 | * Create the predefined _OSI method in the namespace? Default is TRUE |
| 146 | * because ACPICA is fully compatible with other ACPI implementations. |
| 147 | * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. |
| 148 | */ |
| 149 | ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE); |
| 150 | |
| 151 | /* |
| 152 | * Optionally use default values for the ACPI register widths. Set this to |
| 153 | * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. |
| 154 | */ |
| 155 | ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE); |
| 156 | |
| 157 | /* |
| 158 | * Optionally enable output from the AML Debug Object. |
| 159 | */ |
| 160 | ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE); |
| 161 | |
| 162 | /* |
| 163 | * Optionally copy the entire DSDT to local memory (instead of simply |
| 164 | * mapping it.) There are some BIOSs that corrupt or replace the original |
| 165 | * DSDT, creating the need for this option. Default is FALSE, do not copy |
| 166 | * the DSDT. |
| 167 | */ |
| 168 | ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE); |
| 169 | |
| 170 | /* |
| 171 | * Optionally ignore an XSDT if present and use the RSDT instead. |
| 172 | * Although the ACPI specification requires that an XSDT be used instead |
| 173 | * of the RSDT, the XSDT has been found to be corrupt or ill-formed on |
| 174 | * some machines. Default behavior is to use the XSDT if present. |
| 175 | */ |
| 176 | ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); |
| 177 | |
| 178 | /* |
| 179 | * Optionally use 32-bit FADT addresses if and when there is a conflict |
| 180 | * (address mismatch) between the 32-bit and 64-bit versions of the |
| 181 | * address. Although ACPICA adheres to the ACPI specification which |
| 182 | * requires the use of the corresponding 64-bit address if it is non-zero, |
| 183 | * some machines have been found to have a corrupted non-zero 64-bit |
| 184 | * address. Default is FALSE, do not favor the 32-bit addresses. |
| 185 | */ |
| 186 | ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE); |
| 187 | |
| 188 | /* |
| 189 | * Optionally truncate I/O addresses to 16 bits. Provides compatibility |
| 190 | * with other ACPI implementations. NOTE: During ACPICA initialization, |
| 191 | * this value is set to TRUE if any Windows OSI strings have been |
| 192 | * requested by the BIOS. |
| 193 | */ |
| 194 | ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE); |
| 195 | |
| 196 | /* |
| 197 | * Disable runtime checking and repair of values returned by control methods. |
| 198 | * Use only if the repair is causing a problem on a particular machine. |
| 199 | */ |
| 200 | ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE); |
| 201 | |
| 202 | /* |
| 203 | * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. |
| 204 | * This can be useful for debugging ACPI problems on some machines. |
| 205 | */ |
| 206 | ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE); |
| 207 | |
| 208 | /* |
| 209 | * We keep track of the latest version of Windows that has been requested by |
Bob Moore | fea79bc | 2014-04-30 10:05:34 +0800 | [diff] [blame^] | 210 | * the BIOS. ACPI 5.0. |
Lv Zheng | 3035ff7 | 2014-04-30 10:03:52 +0800 | [diff] [blame] | 211 | */ |
| 212 | ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0); |
| 213 | |
| 214 | /* |
Lv Zheng | 3a2f3a3 | 2014-04-30 10:04:35 +0800 | [diff] [blame] | 215 | * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning |
| 216 | * that the ACPI hardware is no longer required. A flag in the FADT indicates |
| 217 | * a reduced HW machine, and that flag is duplicated here for convenience. |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 218 | */ |
Lv Zheng | 3a2f3a3 | 2014-04-30 10:04:35 +0800 | [diff] [blame] | 219 | ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); |
Lv Zheng | 3e8214e | 2012-12-19 05:37:15 +0000 | [diff] [blame] | 220 | |
Lv Zheng | 3a2f3a3 | 2014-04-30 10:04:35 +0800 | [diff] [blame] | 221 | /* |
| 222 | * This mechanism is used to trace a specified AML method. The method is |
| 223 | * traced each time it is executed. |
| 224 | */ |
| 225 | ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0); |
| 226 | ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0); |
Lv Zheng | 3e8214e | 2012-12-19 05:37:15 +0000 | [diff] [blame] | 227 | |
Lv Zheng | 3a2f3a3 | 2014-04-30 10:04:35 +0800 | [diff] [blame] | 228 | /* |
| 229 | * Runtime configuration of debug output control masks. We want the debug |
| 230 | * switches statically initialized so they are already set when the debugger |
| 231 | * is entered. |
| 232 | */ |
| 233 | ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT); |
| 234 | ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0); |
Lv Zheng | 3e8214e | 2012-12-19 05:37:15 +0000 | [diff] [blame] | 235 | |
Lv Zheng | 3a2f3a3 | 2014-04-30 10:04:35 +0800 | [diff] [blame] | 236 | /* |
| 237 | * Globals that are publically available |
| 238 | */ |
| 239 | ACPI_GLOBAL(u32, acpi_current_gpe_count); |
| 240 | ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT); |
| 241 | ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 242 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 243 | /* |
| 244 | * Hardware-reduced prototypes. All interfaces that use these macros will |
| 245 | * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag |
| 246 | * is set to TRUE. |
| 247 | */ |
| 248 | #if (!ACPI_REDUCED_HARDWARE) |
| 249 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 250 | ACPI_EXTERNAL_RETURN_STATUS(prototype) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 251 | |
| 252 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 253 | ACPI_EXTERNAL_RETURN_OK(prototype) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 254 | |
| 255 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 256 | ACPI_EXTERNAL_RETURN_VOID(prototype) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 257 | |
| 258 | #else |
| 259 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ |
| 260 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} |
| 261 | |
| 262 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ |
| 263 | static ACPI_INLINE prototype {return(AE_OK);} |
| 264 | |
| 265 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ |
Bob Moore | c26f3c9 | 2013-10-29 09:29:16 +0800 | [diff] [blame] | 266 | static ACPI_INLINE prototype {return;} |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 267 | |
| 268 | #endif /* !ACPI_REDUCED_HARDWARE */ |
| 269 | |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 270 | /* |
Lv Zheng | 407e22a | 2014-04-30 10:04:48 +0800 | [diff] [blame] | 271 | * Error-message prototypes. All interfaces that use these macros will |
| 272 | * be configured out of the ACPICA build if the ACPI_NO_ERROR_MESSAGE flag |
| 273 | * is defined. |
| 274 | */ |
| 275 | #ifndef ACPI_NO_ERROR_MESSAGES |
| 276 | #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \ |
| 277 | prototype; |
| 278 | |
| 279 | #else |
| 280 | #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \ |
| 281 | static ACPI_INLINE prototype {return;} |
| 282 | |
| 283 | #endif /* ACPI_NO_ERROR_MESSAGES */ |
| 284 | |
| 285 | /* |
Lv Zheng | 1ce28c3 | 2014-04-30 10:04:55 +0800 | [diff] [blame] | 286 | * Debugging-output prototypes. All interfaces that use these macros will |
| 287 | * be configured out of the ACPICA build if the ACPI_DEBUG_OUTPUT flag is |
| 288 | * not defined. |
| 289 | */ |
| 290 | #ifdef ACPI_DEBUG_OUTPUT |
| 291 | #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \ |
| 292 | prototype; |
| 293 | |
| 294 | #else |
| 295 | #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \ |
| 296 | static ACPI_INLINE prototype {return;} |
| 297 | |
| 298 | #endif /* ACPI_DEBUG_OUTPUT */ |
| 299 | |
| 300 | /* |
Lv Zheng | 75c8044 | 2012-12-19 05:36:49 +0000 | [diff] [blame] | 301 | * Initialization |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 303 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init |
| 304 | acpi_initialize_tables(struct acpi_table_desc |
| 305 | *initial_storage, |
| 306 | u32 initial_table_count, |
| 307 | u8 allow_resize)) |
| 308 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void)) |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 309 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 310 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 312 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init |
| 313 | acpi_initialize_objects(u32 flags)) |
| 314 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | |
Lv Zheng | 75c8044 | 2012-12-19 05:36:49 +0000 | [diff] [blame] | 316 | /* |
| 317 | * Miscellaneous global interfaces |
| 318 | */ |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 319 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) |
| 320 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 321 | #ifdef ACPI_FUTURE_USAGE |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 322 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void)) |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 323 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 324 | |
| 325 | #ifdef ACPI_FUTURE_USAGE |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 326 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 327 | acpi_get_system_info(struct acpi_buffer |
| 328 | *ret_buffer)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | #endif |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 330 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 331 | acpi_get_statistics(struct acpi_statistics *stats)) |
| 332 | ACPI_EXTERNAL_RETURN_PTR(const char |
| 333 | *acpi_format_exception(acpi_status exception)) |
| 334 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 336 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 337 | acpi_install_interface(acpi_string interface_name)) |
Lv Zheng | 9187a41 | 2013-10-31 09:30:28 +0800 | [diff] [blame] | 338 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 339 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 340 | acpi_remove_interface(acpi_string interface_name)) |
| 341 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 343 | ACPI_EXTERNAL_RETURN_UINT32(u32 |
| 344 | acpi_check_address_range(acpi_adr_space_type |
| 345 | space_id, |
| 346 | acpi_physical_address |
| 347 | address, acpi_size length, |
| 348 | u8 warn)) |
| 349 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 350 | acpi_decode_pld_buffer(u8 *in_buffer, |
| 351 | acpi_size length, |
| 352 | struct acpi_pld_info |
| 353 | **return_buffer)) |
Bob Moore | be030a5 | 2012-08-17 13:07:54 +0800 | [diff] [blame] | 354 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | /* |
Bob Moore | f60d818 | 2012-07-16 10:21:34 +0800 | [diff] [blame] | 356 | * ACPI table load/unload interfaces |
| 357 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 358 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init |
| 359 | acpi_install_table(acpi_physical_address address, |
| 360 | u8 physical)) |
Lv Zheng | caf4a15 | 2014-04-04 12:39:18 +0800 | [diff] [blame] | 361 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 362 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 363 | acpi_load_table(struct acpi_table_header *table)) |
Bob Moore | f60d818 | 2012-07-16 10:21:34 +0800 | [diff] [blame] | 364 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 365 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 366 | acpi_unload_parent_table(acpi_handle object)) |
| 367 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) |
Bob Moore | f60d818 | 2012-07-16 10:21:34 +0800 | [diff] [blame] | 368 | |
| 369 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 | * ACPI table manipulation interfaces |
| 371 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 372 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 373 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 374 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init |
| 375 | acpi_find_root_pointer(acpi_size * rsdp_address)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 377 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 378 | acpi_get_table_header(acpi_string signature, |
| 379 | u32 instance, |
| 380 | struct acpi_table_header |
| 381 | *out_table_header)) |
| 382 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 383 | acpi_get_table(acpi_string signature, u32 instance, |
| 384 | struct acpi_table_header |
| 385 | **out_table)) |
| 386 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 387 | acpi_get_table_by_index(u32 table_index, |
| 388 | struct acpi_table_header |
| 389 | **out_table)) |
| 390 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 391 | acpi_install_table_handler(acpi_table_handler |
| 392 | handler, void *context)) |
| 393 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 394 | acpi_remove_table_handler(acpi_table_handler |
| 395 | handler)) |
Lin Ming | 3e08e2d | 2008-04-10 19:06:38 +0400 | [diff] [blame] | 396 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | /* |
| 398 | * Namespace and name interfaces |
| 399 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 400 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 401 | acpi_walk_namespace(acpi_object_type type, |
| 402 | acpi_handle start_object, |
| 403 | u32 max_depth, |
| 404 | acpi_walk_callback |
| 405 | descending_callback, |
| 406 | acpi_walk_callback |
| 407 | ascending_callback, |
| 408 | void *context, |
| 409 | void **return_value)) |
| 410 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 411 | acpi_get_devices(const char *HID, |
| 412 | acpi_walk_callback user_function, |
| 413 | void *context, |
| 414 | void **return_value)) |
| 415 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 416 | acpi_get_name(acpi_handle object, u32 name_type, |
| 417 | struct acpi_buffer *ret_path_ptr)) |
| 418 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 419 | acpi_get_handle(acpi_handle parent, |
| 420 | acpi_string pathname, |
| 421 | acpi_handle * ret_handle)) |
| 422 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 423 | acpi_attach_data(acpi_handle object, |
| 424 | acpi_object_handler handler, |
| 425 | void *data)) |
| 426 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 427 | acpi_detach_data(acpi_handle object, |
| 428 | acpi_object_handler handler)) |
| 429 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 430 | acpi_get_data(acpi_handle object, |
| 431 | acpi_object_handler handler, |
| 432 | void **data)) |
| 433 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 434 | acpi_debug_trace(char *name, u32 debug_level, |
| 435 | u32 debug_layer, u32 flags)) |
Bob Moore | 50eca3e | 2005-09-30 19:03:00 -0400 | [diff] [blame] | 436 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 437 | /* |
| 438 | * Object manipulation and enumeration |
| 439 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 440 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 441 | acpi_evaluate_object(acpi_handle object, |
| 442 | acpi_string pathname, |
| 443 | struct acpi_object_list |
| 444 | *parameter_objects, |
| 445 | struct acpi_buffer |
| 446 | *return_object_buffer)) |
| 447 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 448 | acpi_evaluate_object_typed(acpi_handle object, |
| 449 | acpi_string pathname, |
| 450 | struct acpi_object_list |
| 451 | *external_params, |
| 452 | struct acpi_buffer |
| 453 | *return_buffer, |
| 454 | acpi_object_type |
| 455 | return_type)) |
| 456 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 457 | acpi_get_object_info(acpi_handle object, |
| 458 | struct acpi_device_info |
| 459 | **return_buffer)) |
| 460 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 461 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 462 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 463 | acpi_get_next_object(acpi_object_type type, |
| 464 | acpi_handle parent, |
| 465 | acpi_handle child, |
| 466 | acpi_handle * out_handle)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 468 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 469 | acpi_get_type(acpi_handle object, |
| 470 | acpi_object_type * out_type)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 471 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 472 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 473 | acpi_get_parent(acpi_handle object, |
| 474 | acpi_handle * out_handle)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 475 | |
| 476 | /* |
Bob Moore | ecfbbc7 | 2008-12-31 02:55:32 +0800 | [diff] [blame] | 477 | * Handler interfaces |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 478 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 479 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 480 | acpi_install_initialization_handler |
| 481 | (acpi_init_handler handler, u32 function)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 482 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 483 | acpi_install_sci_handler(acpi_sci_handler |
| 484 | address, |
| 485 | void *context)) |
Lv Zheng | a2fd4b4 | 2013-09-23 09:52:05 +0800 | [diff] [blame] | 486 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 487 | acpi_remove_sci_handler(acpi_sci_handler |
| 488 | address)) |
| 489 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 490 | acpi_install_global_event_handler |
| 491 | (acpi_gbl_event_handler handler, |
| 492 | void *context)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 493 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 494 | acpi_install_fixed_event_handler(u32 |
| 495 | acpi_event, |
| 496 | acpi_event_handler |
| 497 | handler, |
| 498 | void |
| 499 | *context)) |
| 500 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 501 | acpi_remove_fixed_event_handler(u32 acpi_event, |
| 502 | acpi_event_handler |
| 503 | handler)) |
| 504 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 505 | acpi_install_gpe_handler(acpi_handle |
| 506 | gpe_device, |
| 507 | u32 gpe_number, |
| 508 | u32 type, |
| 509 | acpi_gpe_handler |
| 510 | address, |
| 511 | void *context)) |
| 512 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 513 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 514 | u32 gpe_number, |
| 515 | acpi_gpe_handler |
| 516 | address)) |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 517 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 518 | acpi_install_notify_handler(acpi_handle device, |
| 519 | u32 handler_type, |
| 520 | acpi_notify_handler |
| 521 | handler, |
| 522 | void *context)) |
| 523 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 524 | acpi_remove_notify_handler(acpi_handle device, |
| 525 | u32 handler_type, |
| 526 | acpi_notify_handler |
| 527 | handler)) |
| 528 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 529 | acpi_install_address_space_handler(acpi_handle |
| 530 | device, |
| 531 | acpi_adr_space_type |
| 532 | space_id, |
| 533 | acpi_adr_space_handler |
| 534 | handler, |
| 535 | acpi_adr_space_setup |
| 536 | setup, |
| 537 | void *context)) |
| 538 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 539 | acpi_remove_address_space_handler(acpi_handle |
| 540 | device, |
| 541 | acpi_adr_space_type |
| 542 | space_id, |
| 543 | acpi_adr_space_handler |
| 544 | handler)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | #ifdef ACPI_FUTURE_USAGE |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 546 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 547 | acpi_install_exception_handler |
| 548 | (acpi_exception_handler handler)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 549 | #endif |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 550 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 551 | acpi_install_interface_handler |
| 552 | (acpi_interface_handler handler)) |
Lin Ming | b0ed7a9 | 2010-08-06 09:35:51 +0800 | [diff] [blame] | 553 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | /* |
Lin Ming | ffef682 | 2011-11-16 11:08:30 +0800 | [diff] [blame] | 555 | * Global Lock interfaces |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 556 | */ |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 557 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 558 | acpi_acquire_global_lock(u16 timeout, |
| 559 | u32 *handle)) |
Lv Zheng | cd27d79 | 2013-10-29 09:30:22 +0800 | [diff] [blame] | 560 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 561 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 562 | acpi_release_global_lock(u32 handle)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | |
Lin Ming | ffef682 | 2011-11-16 11:08:30 +0800 | [diff] [blame] | 564 | /* |
| 565 | * Interfaces to AML mutex objects |
| 566 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 567 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 568 | acpi_acquire_mutex(acpi_handle handle, |
| 569 | acpi_string pathname, |
| 570 | u16 timeout)) |
Lin Ming | ffef682 | 2011-11-16 11:08:30 +0800 | [diff] [blame] | 571 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 572 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 573 | acpi_release_mutex(acpi_handle handle, |
| 574 | acpi_string pathname)) |
Lin Ming | ffef682 | 2011-11-16 11:08:30 +0800 | [diff] [blame] | 575 | |
| 576 | /* |
| 577 | * Fixed Event interfaces |
| 578 | */ |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 579 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 580 | acpi_enable_event(u32 event, u32 flags)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 582 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 583 | acpi_disable_event(u32 event, u32 flags)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 584 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 585 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 586 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 587 | acpi_get_event_status(u32 event, |
| 588 | acpi_event_status |
| 589 | *event_status)) |
Lv Zheng | cd27d79 | 2013-10-29 09:30:22 +0800 | [diff] [blame] | 590 | |
Bob Moore | 08ac07b | 2008-12-30 09:55:48 +0800 | [diff] [blame] | 591 | /* |
Lin Ming | ffef682 | 2011-11-16 11:08:30 +0800 | [diff] [blame] | 592 | * General Purpose Event (GPE) Interfaces |
Bob Moore | 08ac07b | 2008-12-30 09:55:48 +0800 | [diff] [blame] | 593 | */ |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 594 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 595 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 596 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 597 | acpi_enable_gpe(acpi_handle gpe_device, |
| 598 | u32 gpe_number)) |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 599 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 600 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 601 | acpi_disable_gpe(acpi_handle gpe_device, |
| 602 | u32 gpe_number)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 603 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 604 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 605 | acpi_clear_gpe(acpi_handle gpe_device, |
| 606 | u32 gpe_number)) |
Lin Ming | bba63a2 | 2010-12-13 13:39:17 +0800 | [diff] [blame] | 607 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 608 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 609 | acpi_set_gpe(acpi_handle gpe_device, |
| 610 | u32 gpe_number, u8 action)) |
Rafael J. Wysocki | e8b6f97 | 2010-06-25 01:18:39 +0200 | [diff] [blame] | 611 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 612 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 613 | acpi_finish_gpe(acpi_handle gpe_device, |
| 614 | u32 gpe_number)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 616 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 617 | acpi_setup_gpe_for_wake(acpi_handle |
| 618 | parent_device, |
| 619 | acpi_handle gpe_device, |
| 620 | u32 gpe_number)) |
| 621 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 622 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, |
| 623 | u32 gpe_number, |
| 624 | u8 action)) |
| 625 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 626 | acpi_get_gpe_status(acpi_handle gpe_device, |
| 627 | u32 gpe_number, |
| 628 | acpi_event_status |
| 629 | *event_status)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 630 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 631 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) |
Bob Moore | e97d6bf | 2008-12-30 09:45:17 +0800 | [diff] [blame] | 632 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 633 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 634 | acpi_get_gpe_device(u32 gpe_index, |
| 635 | acpi_handle * gpe_device)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 636 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 637 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 638 | acpi_install_gpe_block(acpi_handle gpe_device, |
| 639 | struct |
| 640 | acpi_generic_address |
| 641 | *gpe_block_address, |
| 642 | u32 register_count, |
| 643 | u32 interrupt_number)) |
| 644 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 645 | acpi_remove_gpe_block(acpi_handle gpe_device)) |
Rafael J. Wysocki | a210080 | 2010-09-16 00:30:43 +0200 | [diff] [blame] | 646 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | /* |
| 648 | * Resource interfaces |
| 649 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 650 | typedef |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 651 | acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 652 | void *context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 653 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 654 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 655 | acpi_get_vendor_resource(acpi_handle device, |
| 656 | char *name, |
| 657 | struct acpi_vendor_uuid |
| 658 | *uuid, |
| 659 | struct acpi_buffer |
| 660 | *ret_buffer)) |
| 661 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 662 | acpi_get_current_resources(acpi_handle device, |
| 663 | struct acpi_buffer |
| 664 | *ret_buffer)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 665 | #ifdef ACPI_FUTURE_USAGE |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 666 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 667 | acpi_get_possible_resources(acpi_handle device, |
| 668 | struct acpi_buffer |
| 669 | *ret_buffer)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 670 | #endif |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 671 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 672 | acpi_get_event_resources(acpi_handle device_handle, |
| 673 | struct acpi_buffer |
| 674 | *ret_buffer)) |
| 675 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 676 | acpi_walk_resource_buffer(struct acpi_buffer |
| 677 | *buffer, |
| 678 | acpi_walk_resource_callback |
| 679 | user_function, |
| 680 | void *context)) |
| 681 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 682 | acpi_walk_resources(acpi_handle device, char *name, |
| 683 | acpi_walk_resource_callback |
| 684 | user_function, void *context)) |
| 685 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 686 | acpi_set_current_resources(acpi_handle device, |
| 687 | struct acpi_buffer |
| 688 | *in_buffer)) |
| 689 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 690 | acpi_get_irq_routing_table(acpi_handle device, |
| 691 | struct acpi_buffer |
| 692 | *ret_buffer)) |
| 693 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 694 | acpi_resource_to_address64(struct acpi_resource |
| 695 | *resource, |
| 696 | struct |
| 697 | acpi_resource_address64 |
| 698 | *out)) |
| 699 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 700 | acpi_buffer_to_resource(u8 *aml_buffer, |
| 701 | u16 aml_buffer_length, |
| 702 | struct acpi_resource |
| 703 | **resource_ptr)) |
Bob Moore | 0e24317 | 2011-11-16 14:51:01 +0800 | [diff] [blame] | 704 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 705 | /* |
| 706 | * Hardware (ACPI device) interfaces |
| 707 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 708 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void)) |
Bob Moore | d3fd902 | 2008-12-30 11:11:57 +0800 | [diff] [blame] | 709 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 710 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 711 | acpi_read(u64 *value, |
| 712 | struct acpi_generic_address *reg)) |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 713 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 714 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 715 | acpi_write(u64 value, |
| 716 | struct acpi_generic_address *reg)) |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 717 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 718 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 719 | acpi_read_bit_register(u32 register_id, |
| 720 | u32 *return_value)) |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 721 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 722 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 723 | acpi_write_bit_register(u32 register_id, |
| 724 | u32 value)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 725 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 726 | /* |
| 727 | * Sleep/Wake interfaces |
| 728 | */ |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 729 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 730 | acpi_get_sleep_type_data(u8 sleep_state, |
| 731 | u8 *slp_typ_a, |
| 732 | u8 *slp_typ_b)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 733 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 734 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 735 | acpi_enter_sleep_state_prep(u8 sleep_state)) |
| 736 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 737 | |
Lv Zheng | 40bce10 | 2013-10-31 09:31:18 +0800 | [diff] [blame] | 738 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 739 | |
Lv Zheng | 8b9c115 | 2014-04-30 10:05:08 +0800 | [diff] [blame] | 740 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 741 | acpi_leave_sleep_state_prep(u8 sleep_state)) |
| 742 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 743 | |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 744 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 745 | acpi_set_firmware_waking_vector(u32 |
| 746 | physical_address)) |
Lv Zheng | 739dcbb | 2012-12-20 01:07:26 +0000 | [diff] [blame] | 747 | #if ACPI_MACHINE_WIDTH == 64 |
| 748 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 749 | acpi_set_firmware_waking_vector64(u64 |
| 750 | physical_address)) |
| 751 | #endif |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 752 | /* |
Bob Moore | d08310f | 2012-02-14 15:22:51 +0800 | [diff] [blame] | 753 | * ACPI Timer interfaces |
| 754 | */ |
| 755 | #ifdef ACPI_FUTURE_USAGE |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 756 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 757 | acpi_get_timer_resolution(u32 *resolution)) |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 758 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) |
Bob Moore | d08310f | 2012-02-14 15:22:51 +0800 | [diff] [blame] | 759 | |
Bob Moore | 33620c5 | 2012-02-14 18:14:27 +0800 | [diff] [blame] | 760 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 761 | acpi_get_timer_duration(u32 start_ticks, |
| 762 | u32 end_ticks, |
| 763 | u32 *time_elapsed)) |
Bob Moore | d08310f | 2012-02-14 15:22:51 +0800 | [diff] [blame] | 764 | #endif /* ACPI_FUTURE_USAGE */ |
| 765 | |
| 766 | /* |
Bob Moore | b74be61 | 2009-04-22 10:20:23 +0800 | [diff] [blame] | 767 | * Error/Warning output |
Bob Moore | 50df4d8 | 2008-12-31 03:01:23 +0800 | [diff] [blame] | 768 | */ |
Lv Zheng | 407e22a | 2014-04-30 10:04:48 +0800 | [diff] [blame] | 769 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) |
| 770 | void ACPI_INTERNAL_VAR_XFACE |
| 771 | acpi_error(const char *module_name, |
| 772 | u32 line_number, |
| 773 | const char *format, ...)) |
| 774 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4) |
| 775 | void ACPI_INTERNAL_VAR_XFACE |
| 776 | acpi_exception(const char *module_name, |
| 777 | u32 line_number, |
| 778 | acpi_status status, |
| 779 | const char *format, ...)) |
| 780 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) |
| 781 | void ACPI_INTERNAL_VAR_XFACE |
| 782 | acpi_warning(const char *module_name, |
| 783 | u32 line_number, |
| 784 | const char *format, ...)) |
| 785 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) |
| 786 | void ACPI_INTERNAL_VAR_XFACE |
| 787 | acpi_info(const char *module_name, |
| 788 | u32 line_number, |
| 789 | const char *format, ...)) |
| 790 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) |
| 791 | void ACPI_INTERNAL_VAR_XFACE |
| 792 | acpi_bios_error(const char *module_name, |
| 793 | u32 line_number, |
| 794 | const char *format, ...)) |
| 795 | ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) |
| 796 | void ACPI_INTERNAL_VAR_XFACE |
| 797 | acpi_bios_warning(const char *module_name, |
| 798 | u32 line_number, |
| 799 | const char *format, ...)) |
Bob Moore | 62cdd14 | 2012-07-16 09:25:27 +0800 | [diff] [blame] | 800 | |
Bob Moore | b74be61 | 2009-04-22 10:20:23 +0800 | [diff] [blame] | 801 | /* |
| 802 | * Debug output |
| 803 | */ |
Lv Zheng | 1ce28c3 | 2014-04-30 10:04:55 +0800 | [diff] [blame] | 804 | ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6) |
| 805 | void ACPI_INTERNAL_VAR_XFACE |
| 806 | acpi_debug_print(u32 requested_debug_level, |
| 807 | u32 line_number, |
| 808 | const char *function_name, |
| 809 | const char *module_name, |
| 810 | u32 component_id, |
| 811 | const char *format, ...)) |
| 812 | ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6) |
| 813 | void ACPI_INTERNAL_VAR_XFACE |
| 814 | acpi_debug_print_raw(u32 requested_debug_level, |
| 815 | u32 line_number, |
| 816 | const char *function_name, |
| 817 | const char *module_name, |
| 818 | u32 component_id, |
| 819 | const char *format, ...)) |
Lv Zheng | 0dedb3c | 2014-04-30 10:05:02 +0800 | [diff] [blame] | 820 | |
| 821 | /* |
| 822 | * Divergences |
| 823 | */ |
| 824 | acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); |
| 825 | |
| 826 | acpi_status acpi_unload_table_id(acpi_owner_id id); |
| 827 | |
| 828 | acpi_status |
| 829 | acpi_get_table_with_size(acpi_string signature, |
| 830 | u32 instance, struct acpi_table_header **out_table, |
| 831 | acpi_size *tbl_size); |
| 832 | |
| 833 | acpi_status |
| 834 | acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, |
| 835 | void (*callback)(void *)); |
| 836 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 837 | #endif /* __ACXFACE_H__ */ |