acpixf.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:7k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /******************************************************************************
  2.  *
  3.  * Name: acpixf.h - External interfaces to the ACPI subsystem
  4.  *
  5.  *****************************************************************************/
  6. /*
  7.  *  Copyright (C) 2000, 2001 R. Byron Moore
  8.  *
  9.  *  This program is free software; you can redistribute it and/or modify
  10.  *  it under the terms of the GNU General Public License as published by
  11.  *  the Free Software Foundation; either version 2 of the License, or
  12.  *  (at your option) any later version.
  13.  *
  14.  *  This program is distributed in the hope that it will be useful,
  15.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  *  GNU General Public License for more details.
  18.  *
  19.  *  You should have received a copy of the GNU General Public License
  20.  *  along with this program; if not, write to the Free Software
  21.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  22.  */
  23. #ifndef __ACXFACE_H__
  24. #define __ACXFACE_H__
  25. #include "actypes.h"
  26. #include "actbl.h"
  27.  /*
  28.  * Global interfaces
  29.  */
  30. acpi_status
  31. acpi_initialize_subsystem (
  32. void);
  33. acpi_status
  34. acpi_enable_subsystem (
  35. u32                     flags);
  36. acpi_status
  37. acpi_terminate (
  38. void);
  39. acpi_status
  40. acpi_subsystem_status (
  41. void);
  42. acpi_status
  43. acpi_enable (
  44. void);
  45. acpi_status
  46. acpi_disable (
  47. void);
  48. acpi_status
  49. acpi_get_system_info (
  50. acpi_buffer             *ret_buffer);
  51. const char *
  52. acpi_format_exception (
  53. acpi_status             exception);
  54. /*
  55.  * ACPI Memory manager
  56.  */
  57. void *
  58. acpi_allocate (
  59. u32                     size);
  60. void *
  61. acpi_callocate (
  62. u32                     size);
  63. void
  64. acpi_free (
  65. void                    *address);
  66. /*
  67.  * ACPI table manipulation interfaces
  68.  */
  69. acpi_status
  70. acpi_find_root_pointer (
  71. u32                     flags,
  72. ACPI_PHYSICAL_ADDRESS   *rsdp_physical_address);
  73. acpi_status
  74. acpi_load_tables (
  75. void);
  76. acpi_status
  77. acpi_load_table (
  78. acpi_table_header       *table_ptr);
  79. acpi_status
  80. acpi_unload_table (
  81. acpi_table_type         table_type);
  82. acpi_status
  83. acpi_get_table_header (
  84. acpi_table_type         table_type,
  85. u32                     instance,
  86. acpi_table_header       *out_table_header);
  87. acpi_status
  88. acpi_get_table (
  89. acpi_table_type         table_type,
  90. u32                     instance,
  91. acpi_buffer             *ret_buffer);
  92. acpi_status
  93. acpi_get_firmware_table (
  94. acpi_string             signature,
  95. u32                     instance,
  96. u32                     flags,
  97. acpi_table_header       **table_pointer);
  98. /*
  99.  * Namespace and name interfaces
  100.  */
  101. acpi_status
  102. acpi_walk_namespace (
  103. acpi_object_type        type,
  104. acpi_handle             start_object,
  105. u32                     max_depth,
  106. acpi_walk_callback      user_function,
  107. void                    *context,
  108. void *                  *return_value);
  109. acpi_status
  110. acpi_get_devices (
  111. NATIVE_CHAR             *HID,
  112. acpi_walk_callback      user_function,
  113. void                    *context,
  114. void                    **return_value);
  115. acpi_status
  116. acpi_get_name (
  117. acpi_handle             handle,
  118. u32                     name_type,
  119. acpi_buffer             *ret_path_ptr);
  120. acpi_status
  121. acpi_get_handle (
  122. acpi_handle             parent,
  123. acpi_string             pathname,
  124. acpi_handle             *ret_handle);
  125. /*
  126.  * Object manipulation and enumeration
  127.  */
  128. acpi_status
  129. acpi_evaluate_object (
  130. acpi_handle             object,
  131. acpi_string             pathname,
  132. acpi_object_list        *parameter_objects,
  133. acpi_buffer             *return_object_buffer);
  134. acpi_status
  135. acpi_get_object_info (
  136. acpi_handle             device,
  137. acpi_device_info        *info);
  138. acpi_status
  139. acpi_get_next_object (
  140. acpi_object_type        type,
  141. acpi_handle             parent,
  142. acpi_handle             child,
  143. acpi_handle             *out_handle);
  144. acpi_status
  145. acpi_get_type (
  146. acpi_handle             object,
  147. acpi_object_type        *out_type);
  148. acpi_status
  149. acpi_get_parent (
  150. acpi_handle             object,
  151. acpi_handle             *out_handle);
  152. /*
  153.  * Event handler interfaces
  154.  */
  155. acpi_status
  156. acpi_install_fixed_event_handler (
  157. u32                     acpi_event,
  158. acpi_event_handler      handler,
  159. void                    *context);
  160. acpi_status
  161. acpi_remove_fixed_event_handler (
  162. u32                     acpi_event,
  163. acpi_event_handler      handler);
  164. acpi_status
  165. acpi_install_notify_handler (
  166. acpi_handle             device,
  167. u32                     handler_type,
  168. acpi_notify_handler     handler,
  169. void                    *context);
  170. acpi_status
  171. acpi_remove_notify_handler (
  172. acpi_handle             device,
  173. u32                     handler_type,
  174. acpi_notify_handler     handler);
  175. acpi_status
  176. acpi_install_address_space_handler (
  177. acpi_handle             device,
  178. ACPI_ADR_SPACE_TYPE     space_id,
  179. acpi_adr_space_handler  handler,
  180. acpi_adr_space_setup    setup,
  181. void                    *context);
  182. acpi_status
  183. acpi_remove_address_space_handler (
  184. acpi_handle             device,
  185. ACPI_ADR_SPACE_TYPE     space_id,
  186. acpi_adr_space_handler  handler);
  187. acpi_status
  188. acpi_install_gpe_handler (
  189. u32                     gpe_number,
  190. u32                     type,
  191. acpi_gpe_handler        handler,
  192. void                    *context);
  193. acpi_status
  194. acpi_acquire_global_lock (
  195. void);
  196. acpi_status
  197. acpi_release_global_lock (
  198. void);
  199. acpi_status
  200. acpi_remove_gpe_handler (
  201. u32                     gpe_number,
  202. acpi_gpe_handler        handler);
  203. acpi_status
  204. acpi_enable_event (
  205. u32                     acpi_event,
  206. u32                     type,
  207. u32                     flags);
  208. acpi_status
  209. acpi_disable_event (
  210. u32                     acpi_event,
  211. u32                     type,
  212. u32                     flags);
  213. acpi_status
  214. acpi_clear_event (
  215. u32                     acpi_event,
  216. u32                     type);
  217. acpi_status
  218. acpi_get_event_status (
  219. u32                     acpi_event,
  220. u32                     type,
  221. acpi_event_status       *event_status);
  222. /*
  223.  * Resource interfaces
  224.  */
  225. acpi_status
  226. acpi_get_current_resources(
  227. acpi_handle             device_handle,
  228. acpi_buffer             *ret_buffer);
  229. acpi_status
  230. acpi_get_possible_resources(
  231. acpi_handle             device_handle,
  232. acpi_buffer             *ret_buffer);
  233. acpi_status
  234. acpi_set_current_resources (
  235. acpi_handle             device_handle,
  236. acpi_buffer             *in_buffer);
  237. acpi_status
  238. acpi_get_irq_routing_table (
  239. acpi_handle             bus_device_handle,
  240. acpi_buffer             *ret_buffer);
  241. /*
  242.  * Hardware (ACPI device) interfaces
  243.  */
  244. acpi_status
  245. acpi_set_firmware_waking_vector (
  246. ACPI_PHYSICAL_ADDRESS   physical_address);
  247. acpi_status
  248. acpi_get_firmware_waking_vector (
  249. ACPI_PHYSICAL_ADDRESS   *physical_address);
  250. acpi_status
  251. acpi_enter_sleep_state (
  252. u8 sleep_state);
  253. acpi_status
  254. acpi_leave_sleep_state (
  255. u8 sleep_state);
  256. #endif /* __ACXFACE_H__ */