include/acpi/acpixf.h
changeset 2 d1f6d8b6f81c
parent 0 aa628870c1d3
equal deleted inserted replaced
1:0056487c491e 2:d1f6d8b6f81c
    43  */
    43  */
    44 
    44 
    45 #ifndef __ACXFACE_H__
    45 #ifndef __ACXFACE_H__
    46 #define __ACXFACE_H__
    46 #define __ACXFACE_H__
    47 
    47 
       
    48 /* Current ACPICA subsystem version in YYYYMMDD format */
       
    49 
       
    50 #define ACPI_CA_VERSION                 0x20081204
       
    51 
    48 #include "actypes.h"
    52 #include "actypes.h"
    49 #include "actbl.h"
    53 #include "actbl.h"
    50 
    54 
       
    55 extern u8 acpi_gbl_permanent_mmap;
       
    56 
       
    57 /*
       
    58  * Globals that are publically available, allowing for
       
    59  * run time configuration
       
    60  */
       
    61 extern u32 acpi_dbg_level;
       
    62 extern u32 acpi_dbg_layer;
       
    63 extern u8 acpi_gbl_enable_interpreter_slack;
       
    64 extern u8 acpi_gbl_all_methods_serialized;
       
    65 extern u8 acpi_gbl_create_osi_method;
       
    66 extern u8 acpi_gbl_leave_wake_gpes_disabled;
       
    67 extern acpi_name acpi_gbl_trace_method_name;
       
    68 extern u32 acpi_gbl_trace_flags;
       
    69 
       
    70 extern u32 acpi_current_gpe_count;
       
    71 extern struct acpi_table_fadt acpi_gbl_FADT;
       
    72 
       
    73 extern u32 acpi_rsdt_forced;
    51 /*
    74 /*
    52  * Global interfaces
    75  * Global interfaces
    53  */
    76  */
    54 acpi_status
    77 acpi_status
    55 acpi_initialize_tables(struct acpi_table_desc *initial_storage,
    78 acpi_initialize_tables(struct acpi_table_desc *initial_storage,
    76 #endif
    99 #endif
    77 
   100 
    78 const char *acpi_format_exception(acpi_status exception);
   101 const char *acpi_format_exception(acpi_status exception);
    79 
   102 
    80 acpi_status acpi_purge_cached_objects(void);
   103 acpi_status acpi_purge_cached_objects(void);
    81 
       
    82 #ifdef ACPI_FUTURE_USAGE
       
    83 acpi_status
       
    84 acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
       
    85 #endif
       
    86 
   104 
    87 /*
   105 /*
    88  * ACPI Memory management
   106  * ACPI Memory management
    89  */
   107  */
    90 void *acpi_allocate(u32 size);
   108 void *acpi_allocate(u32 size);
   191 acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
   209 acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
   192 
   210 
   193 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
   211 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
   194 
   212 
   195 /*
   213 /*
   196  * Event handler interfaces
   214  * Handler interfaces
   197  */
   215  */
       
   216 acpi_status
       
   217 acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
       
   218 
   198 acpi_status
   219 acpi_status
   199 acpi_install_fixed_event_handler(u32 acpi_event,
   220 acpi_install_fixed_event_handler(u32 acpi_event,
   200 				 acpi_event_handler handler, void *context);
   221 				 acpi_event_handler handler, void *context);
   201 
   222 
   202 acpi_status
   223 acpi_status
   225 acpi_status
   246 acpi_status
   226 acpi_install_gpe_handler(acpi_handle gpe_device,
   247 acpi_install_gpe_handler(acpi_handle gpe_device,
   227 			 u32 gpe_number,
   248 			 u32 gpe_number,
   228 			 u32 type, acpi_event_handler address, void *context);
   249 			 u32 type, acpi_event_handler address, void *context);
   229 
   250 
       
   251 acpi_status
       
   252 acpi_remove_gpe_handler(acpi_handle gpe_device,
       
   253 			u32 gpe_number, acpi_event_handler address);
       
   254 
   230 #ifdef ACPI_FUTURE_USAGE
   255 #ifdef ACPI_FUTURE_USAGE
   231 acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
   256 acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
   232 #endif
   257 #endif
   233 
   258 
   234 /*
   259 /*
   236  */
   261  */
   237 acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle);
   262 acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle);
   238 
   263 
   239 acpi_status acpi_release_global_lock(u32 handle);
   264 acpi_status acpi_release_global_lock(u32 handle);
   240 
   265 
   241 acpi_status
       
   242 acpi_remove_gpe_handler(acpi_handle gpe_device,
       
   243 			u32 gpe_number, acpi_event_handler address);
       
   244 
       
   245 acpi_status acpi_enable_event(u32 event, u32 flags);
   266 acpi_status acpi_enable_event(u32 event, u32 flags);
   246 
   267 
   247 acpi_status acpi_disable_event(u32 event, u32 flags);
   268 acpi_status acpi_disable_event(u32 event, u32 flags);
   248 
   269 
   249 acpi_status acpi_clear_event(u32 event);
   270 acpi_status acpi_clear_event(u32 event);
   250 
   271 
   251 acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
   272 acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
   252 
   273 
       
   274 /*
       
   275  * GPE Interfaces
       
   276  */
   253 acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
   277 acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
   254 
   278 
   255 acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
   279 acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
   256 
   280 
   257 acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number);
   281 acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number);
   260 
   284 
   261 acpi_status
   285 acpi_status
   262 acpi_get_gpe_status(acpi_handle gpe_device,
   286 acpi_get_gpe_status(acpi_handle gpe_device,
   263 		    u32 gpe_number,
   287 		    u32 gpe_number,
   264 		    u32 flags, acpi_event_status * event_status);
   288 		    u32 flags, acpi_event_status * event_status);
       
   289 
       
   290 acpi_status acpi_disable_all_gpes(void);
       
   291 
       
   292 acpi_status acpi_enable_all_runtime_gpes(void);
       
   293 
       
   294 acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device);
   265 
   295 
   266 acpi_status
   296 acpi_status
   267 acpi_install_gpe_block(acpi_handle gpe_device,
   297 acpi_install_gpe_block(acpi_handle gpe_device,
   268 		       struct acpi_generic_address *gpe_block_address,
   298 		       struct acpi_generic_address *gpe_block_address,
   269 		       u32 register_count, u32 interrupt_number);
   299 		       u32 register_count, u32 interrupt_number);
   311 			   struct acpi_resource_address64 *out);
   341 			   struct acpi_resource_address64 *out);
   312 
   342 
   313 /*
   343 /*
   314  * Hardware (ACPI device) interfaces
   344  * Hardware (ACPI device) interfaces
   315  */
   345  */
       
   346 acpi_status acpi_reset(void);
       
   347 
   316 acpi_status acpi_get_register(u32 register_id, u32 * return_value);
   348 acpi_status acpi_get_register(u32 register_id, u32 * return_value);
   317 
   349 
   318 acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);
   350 acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);
   319 
   351 
   320 acpi_status acpi_set_register(u32 register_id, u32 value);
   352 acpi_status acpi_set_register(u32 register_id, u32 value);
   321 
   353 
   322 acpi_status
   354 acpi_status
   323 acpi_set_firmware_waking_vector(acpi_physical_address physical_address);
   355 acpi_set_firmware_waking_vector(u32 physical_address);
   324 
   356 
   325 #ifdef ACPI_FUTURE_USAGE
   357 acpi_status
   326 acpi_status
   358 acpi_set_firmware_waking_vector64(u64 physical_address);
   327 acpi_get_firmware_waking_vector(acpi_physical_address * physical_address);
   359 
   328 #endif
   360 acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg);
       
   361 
       
   362 acpi_status acpi_write(u32 value, struct acpi_generic_address *reg);
   329 
   363 
   330 acpi_status
   364 acpi_status
   331 acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b);
   365 acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b);
   332 
   366 
   333 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
   367 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
   338 
   372 
   339 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
   373 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
   340 
   374 
   341 acpi_status acpi_leave_sleep_state(u8 sleep_state);
   375 acpi_status acpi_leave_sleep_state(u8 sleep_state);
   342 
   376 
       
   377 /*
       
   378  * Debug output
       
   379  */
       
   380 void ACPI_INTERNAL_VAR_XFACE
       
   381 acpi_error(const char *module_name,
       
   382 	   u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
       
   383 
       
   384 void ACPI_INTERNAL_VAR_XFACE
       
   385 acpi_exception(const char *module_name,
       
   386 	       u32 line_number,
       
   387 	       acpi_status status, const char *format, ...) ACPI_PRINTF_LIKE(4);
       
   388 
       
   389 void ACPI_INTERNAL_VAR_XFACE
       
   390 acpi_warning(const char *module_name,
       
   391 	     u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
       
   392 
       
   393 void ACPI_INTERNAL_VAR_XFACE
       
   394 acpi_info(const char *module_name,
       
   395 	  u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3);
       
   396 
       
   397 #ifdef ACPI_DEBUG_OUTPUT
       
   398 
       
   399 void ACPI_INTERNAL_VAR_XFACE
       
   400 acpi_debug_print(u32 requested_debug_level,
       
   401 		 u32 line_number,
       
   402 		 const char *function_name,
       
   403 		 const char *module_name,
       
   404 		 u32 component_id, const char *format, ...) ACPI_PRINTF_LIKE(6);
       
   405 
       
   406 void ACPI_INTERNAL_VAR_XFACE
       
   407 acpi_debug_print_raw(u32 requested_debug_level,
       
   408 		     u32 line_number,
       
   409 		     const char *function_name,
       
   410 		     const char *module_name,
       
   411 		     u32 component_id,
       
   412 		     const char *format, ...) ACPI_PRINTF_LIKE(6);
       
   413 #endif
       
   414 
   343 #endif				/* __ACXFACE_H__ */
   415 #endif				/* __ACXFACE_H__ */