acevents.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. /******************************************************************************
  2. *
  3. * Name: acevents.h - Event subcomponent prototypes and defines
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, R. Byron Moore
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACEVENTS_H__
  43. #define __ACEVENTS_H__
  44. acpi_status
  45. acpi_ev_initialize_events (
  46. void);
  47. acpi_status
  48. acpi_ev_install_xrupt_handlers (
  49. void);
  50. /*
  51. * Evfixed - Fixed event handling
  52. */
  53. acpi_status
  54. acpi_ev_fixed_event_initialize (
  55. void);
  56. u32
  57. acpi_ev_fixed_event_detect (
  58. void);
  59. u32
  60. acpi_ev_fixed_event_dispatch (
  61. u32 event);
  62. /*
  63. * Evmisc
  64. */
  65. u8
  66. acpi_ev_is_notify_object (
  67. struct acpi_namespace_node *node);
  68. acpi_status
  69. acpi_ev_acquire_global_lock(
  70. u16 timeout);
  71. acpi_status
  72. acpi_ev_release_global_lock(
  73. void);
  74. acpi_status
  75. acpi_ev_init_global_lock_handler (
  76. void);
  77. u32
  78. acpi_ev_get_gpe_number_index (
  79. u32 gpe_number);
  80. acpi_status
  81. acpi_ev_queue_notify_request (
  82. struct acpi_namespace_node *node,
  83. u32 notify_value);
  84. void ACPI_SYSTEM_XFACE
  85. acpi_ev_notify_dispatch (
  86. void *context);
  87. /*
  88. * Evgpe - GPE handling and dispatch
  89. */
  90. acpi_status
  91. acpi_ev_walk_gpe_list (
  92. ACPI_GPE_CALLBACK gpe_walk_callback,
  93. u32 flags);
  94. u8
  95. acpi_ev_valid_gpe_event (
  96. struct acpi_gpe_event_info *gpe_event_info);
  97. acpi_status
  98. acpi_ev_update_gpe_enable_masks (
  99. struct acpi_gpe_event_info *gpe_event_info,
  100. u8 type);
  101. acpi_status
  102. acpi_ev_enable_gpe (
  103. struct acpi_gpe_event_info *gpe_event_info,
  104. u8 write_to_hardware);
  105. acpi_status
  106. acpi_ev_disable_gpe (
  107. struct acpi_gpe_event_info *gpe_event_info);
  108. struct acpi_gpe_event_info *
  109. acpi_ev_get_gpe_event_info (
  110. acpi_handle gpe_device,
  111. u32 gpe_number);
  112. acpi_status
  113. acpi_ev_gpe_initialize (
  114. void);
  115. acpi_status
  116. acpi_ev_create_gpe_block (
  117. struct acpi_namespace_node *gpe_device,
  118. struct acpi_generic_address *gpe_block_address,
  119. u32 register_count,
  120. u8 gpe_block_base_number,
  121. u32 interrupt_level,
  122. struct acpi_gpe_block_info **return_gpe_block);
  123. acpi_status
  124. acpi_ev_delete_gpe_block (
  125. struct acpi_gpe_block_info *gpe_block);
  126. acpi_status
  127. acpi_ev_delete_gpe_handlers (
  128. struct acpi_gpe_xrupt_info *gpe_xrupt_info,
  129. struct acpi_gpe_block_info *gpe_block);
  130. u32
  131. acpi_ev_gpe_dispatch (
  132. struct acpi_gpe_event_info *gpe_event_info,
  133. u32 gpe_number);
  134. u32
  135. acpi_ev_gpe_detect (
  136. struct acpi_gpe_xrupt_info *gpe_xrupt_list);
  137. acpi_status
  138. acpi_ev_set_gpe_type (
  139. struct acpi_gpe_event_info *gpe_event_info,
  140. u8 type);
  141. acpi_status
  142. acpi_ev_check_for_wake_only_gpe (
  143. struct acpi_gpe_event_info *gpe_event_info);
  144. /*
  145. * Evregion - Address Space handling
  146. */
  147. acpi_status
  148. acpi_ev_install_region_handlers (
  149. void);
  150. acpi_status
  151. acpi_ev_initialize_op_regions (
  152. void);
  153. acpi_status
  154. acpi_ev_address_space_dispatch (
  155. union acpi_operand_object *region_obj,
  156. u32 function,
  157. acpi_physical_address address,
  158. u32 bit_width,
  159. void *value);
  160. acpi_status
  161. acpi_ev_install_handler (
  162. acpi_handle obj_handle,
  163. u32 level,
  164. void *context,
  165. void **return_value);
  166. acpi_status
  167. acpi_ev_attach_region (
  168. union acpi_operand_object *handler_obj,
  169. union acpi_operand_object *region_obj,
  170. u8 acpi_ns_is_locked);
  171. void
  172. acpi_ev_detach_region (
  173. union acpi_operand_object *region_obj,
  174. u8 acpi_ns_is_locked);
  175. acpi_status
  176. acpi_ev_install_space_handler (
  177. struct acpi_namespace_node *node,
  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_ev_execute_reg_methods (
  184. struct acpi_namespace_node *node,
  185. acpi_adr_space_type space_id);
  186. acpi_status
  187. acpi_ev_execute_reg_method (
  188. union acpi_operand_object *region_obj,
  189. u32 function);
  190. acpi_status
  191. acpi_ev_reg_run (
  192. acpi_handle obj_handle,
  193. u32 level,
  194. void *context,
  195. void **return_value);
  196. /*
  197. * Evregini - Region initialization and setup
  198. */
  199. acpi_status
  200. acpi_ev_system_memory_region_setup (
  201. acpi_handle handle,
  202. u32 function,
  203. void *handler_context,
  204. void **region_context);
  205. acpi_status
  206. acpi_ev_io_space_region_setup (
  207. acpi_handle handle,
  208. u32 function,
  209. void *handler_context,
  210. void **region_context);
  211. acpi_status
  212. acpi_ev_pci_config_region_setup (
  213. acpi_handle handle,
  214. u32 function,
  215. void *handler_context,
  216. void **region_context);
  217. acpi_status
  218. acpi_ev_cmos_region_setup (
  219. acpi_handle handle,
  220. u32 function,
  221. void *handler_context,
  222. void **region_context);
  223. acpi_status
  224. acpi_ev_pci_bar_region_setup (
  225. acpi_handle handle,
  226. u32 function,
  227. void *handler_context,
  228. void **region_context);
  229. acpi_status
  230. acpi_ev_default_region_setup (
  231. acpi_handle handle,
  232. u32 function,
  233. void *handler_context,
  234. void **region_context);
  235. acpi_status
  236. acpi_ev_initialize_region (
  237. union acpi_operand_object *region_obj,
  238. u8 acpi_ns_locked);
  239. /*
  240. * Evsci - SCI (System Control Interrupt) handling/dispatch
  241. */
  242. u32 ACPI_SYSTEM_XFACE
  243. acpi_ev_gpe_xrupt_handler (
  244. void *context);
  245. u32
  246. acpi_ev_install_sci_handler (
  247. void);
  248. acpi_status
  249. acpi_ev_remove_sci_handler (
  250. void);
  251. u32
  252. acpi_ev_initialize_sCI (
  253. u32 program_sCI);
  254. void
  255. acpi_ev_terminate (
  256. void);
  257. #endif /* __ACEVENTS_H__ */