acevents.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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. /*
  45. * evevent
  46. */
  47. acpi_status
  48. acpi_ev_initialize_events (
  49. void);
  50. acpi_status
  51. acpi_ev_install_xrupt_handlers (
  52. void);
  53. u32
  54. acpi_ev_fixed_event_detect (
  55. void);
  56. /*
  57. * evmisc
  58. */
  59. u8
  60. acpi_ev_is_notify_object (
  61. struct acpi_namespace_node *node);
  62. acpi_status
  63. acpi_ev_acquire_global_lock(
  64. u16 timeout);
  65. acpi_status
  66. acpi_ev_release_global_lock(
  67. void);
  68. acpi_status
  69. acpi_ev_init_global_lock_handler (
  70. void);
  71. u32
  72. acpi_ev_get_gpe_number_index (
  73. u32 gpe_number);
  74. acpi_status
  75. acpi_ev_queue_notify_request (
  76. struct acpi_namespace_node *node,
  77. u32 notify_value);
  78. /*
  79. * evgpe - GPE handling and dispatch
  80. */
  81. acpi_status
  82. acpi_ev_update_gpe_enable_masks (
  83. struct acpi_gpe_event_info *gpe_event_info,
  84. u8 type);
  85. acpi_status
  86. acpi_ev_enable_gpe (
  87. struct acpi_gpe_event_info *gpe_event_info,
  88. u8 write_to_hardware);
  89. acpi_status
  90. acpi_ev_disable_gpe (
  91. struct acpi_gpe_event_info *gpe_event_info);
  92. struct acpi_gpe_event_info *
  93. acpi_ev_get_gpe_event_info (
  94. acpi_handle gpe_device,
  95. u32 gpe_number);
  96. /*
  97. * evgpeblk
  98. */
  99. u8
  100. acpi_ev_valid_gpe_event (
  101. struct acpi_gpe_event_info *gpe_event_info);
  102. acpi_status
  103. acpi_ev_walk_gpe_list (
  104. ACPI_GPE_CALLBACK gpe_walk_callback,
  105. u32 flags);
  106. acpi_status
  107. acpi_ev_delete_gpe_handlers (
  108. struct acpi_gpe_xrupt_info *gpe_xrupt_info,
  109. struct acpi_gpe_block_info *gpe_block);
  110. acpi_status
  111. acpi_ev_create_gpe_block (
  112. struct acpi_namespace_node *gpe_device,
  113. struct acpi_generic_address *gpe_block_address,
  114. u32 register_count,
  115. u8 gpe_block_base_number,
  116. u32 interrupt_level,
  117. struct acpi_gpe_block_info **return_gpe_block);
  118. acpi_status
  119. acpi_ev_delete_gpe_block (
  120. struct acpi_gpe_block_info *gpe_block);
  121. u32
  122. acpi_ev_gpe_dispatch (
  123. struct acpi_gpe_event_info *gpe_event_info,
  124. u32 gpe_number);
  125. u32
  126. acpi_ev_gpe_detect (
  127. struct acpi_gpe_xrupt_info *gpe_xrupt_list);
  128. acpi_status
  129. acpi_ev_set_gpe_type (
  130. struct acpi_gpe_event_info *gpe_event_info,
  131. u8 type);
  132. acpi_status
  133. acpi_ev_check_for_wake_only_gpe (
  134. struct acpi_gpe_event_info *gpe_event_info);
  135. acpi_status
  136. acpi_ev_gpe_initialize (
  137. void);
  138. /*
  139. * evregion - Address Space handling
  140. */
  141. acpi_status
  142. acpi_ev_install_region_handlers (
  143. void);
  144. acpi_status
  145. acpi_ev_initialize_op_regions (
  146. void);
  147. acpi_status
  148. acpi_ev_address_space_dispatch (
  149. union acpi_operand_object *region_obj,
  150. u32 function,
  151. acpi_physical_address address,
  152. u32 bit_width,
  153. void *value);
  154. acpi_status
  155. acpi_ev_attach_region (
  156. union acpi_operand_object *handler_obj,
  157. union acpi_operand_object *region_obj,
  158. u8 acpi_ns_is_locked);
  159. void
  160. acpi_ev_detach_region (
  161. union acpi_operand_object *region_obj,
  162. u8 acpi_ns_is_locked);
  163. acpi_status
  164. acpi_ev_install_space_handler (
  165. struct acpi_namespace_node *node,
  166. acpi_adr_space_type space_id,
  167. acpi_adr_space_handler handler,
  168. acpi_adr_space_setup setup,
  169. void *context);
  170. acpi_status
  171. acpi_ev_execute_reg_methods (
  172. struct acpi_namespace_node *node,
  173. acpi_adr_space_type space_id);
  174. acpi_status
  175. acpi_ev_execute_reg_method (
  176. union acpi_operand_object *region_obj,
  177. u32 function);
  178. /*
  179. * evregini - Region initialization and setup
  180. */
  181. acpi_status
  182. acpi_ev_system_memory_region_setup (
  183. acpi_handle handle,
  184. u32 function,
  185. void *handler_context,
  186. void **region_context);
  187. acpi_status
  188. acpi_ev_io_space_region_setup (
  189. acpi_handle handle,
  190. u32 function,
  191. void *handler_context,
  192. void **region_context);
  193. acpi_status
  194. acpi_ev_pci_config_region_setup (
  195. acpi_handle handle,
  196. u32 function,
  197. void *handler_context,
  198. void **region_context);
  199. acpi_status
  200. acpi_ev_cmos_region_setup (
  201. acpi_handle handle,
  202. u32 function,
  203. void *handler_context,
  204. void **region_context);
  205. acpi_status
  206. acpi_ev_pci_bar_region_setup (
  207. acpi_handle handle,
  208. u32 function,
  209. void *handler_context,
  210. void **region_context);
  211. acpi_status
  212. acpi_ev_default_region_setup (
  213. acpi_handle handle,
  214. u32 function,
  215. void *handler_context,
  216. void **region_context);
  217. acpi_status
  218. acpi_ev_initialize_region (
  219. union acpi_operand_object *region_obj,
  220. u8 acpi_ns_locked);
  221. /*
  222. * evsci - SCI (System Control Interrupt) handling/dispatch
  223. */
  224. u32 ACPI_SYSTEM_XFACE
  225. acpi_ev_gpe_xrupt_handler (
  226. void *context);
  227. u32
  228. acpi_ev_install_sci_handler (
  229. void);
  230. acpi_status
  231. acpi_ev_remove_sci_handler (
  232. void);
  233. u32
  234. acpi_ev_initialize_sCI (
  235. u32 program_sCI);
  236. void
  237. acpi_ev_terminate (
  238. void);
  239. #endif /* __ACEVENTS_H__ */