acevents.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. acpi_status
  106. acpi_ev_delete_gpe_handlers (
  107. struct acpi_gpe_xrupt_info *gpe_xrupt_info,
  108. struct acpi_gpe_block_info *gpe_block);
  109. acpi_status
  110. acpi_ev_create_gpe_block (
  111. struct acpi_namespace_node *gpe_device,
  112. struct acpi_generic_address *gpe_block_address,
  113. u32 register_count,
  114. u8 gpe_block_base_number,
  115. u32 interrupt_number,
  116. struct acpi_gpe_block_info **return_gpe_block);
  117. acpi_status
  118. acpi_ev_delete_gpe_block (
  119. struct acpi_gpe_block_info *gpe_block);
  120. u32
  121. acpi_ev_gpe_dispatch (
  122. struct acpi_gpe_event_info *gpe_event_info,
  123. u32 gpe_number);
  124. u32
  125. acpi_ev_gpe_detect (
  126. struct acpi_gpe_xrupt_info *gpe_xrupt_list);
  127. acpi_status
  128. acpi_ev_set_gpe_type (
  129. struct acpi_gpe_event_info *gpe_event_info,
  130. u8 type);
  131. acpi_status
  132. acpi_ev_check_for_wake_only_gpe (
  133. struct acpi_gpe_event_info *gpe_event_info);
  134. acpi_status
  135. acpi_ev_gpe_initialize (
  136. void);
  137. /*
  138. * evregion - Address Space handling
  139. */
  140. acpi_status
  141. acpi_ev_install_region_handlers (
  142. void);
  143. acpi_status
  144. acpi_ev_initialize_op_regions (
  145. void);
  146. acpi_status
  147. acpi_ev_address_space_dispatch (
  148. union acpi_operand_object *region_obj,
  149. u32 function,
  150. acpi_physical_address address,
  151. u32 bit_width,
  152. void *value);
  153. acpi_status
  154. acpi_ev_attach_region (
  155. union acpi_operand_object *handler_obj,
  156. union acpi_operand_object *region_obj,
  157. u8 acpi_ns_is_locked);
  158. void
  159. acpi_ev_detach_region (
  160. union acpi_operand_object *region_obj,
  161. u8 acpi_ns_is_locked);
  162. acpi_status
  163. acpi_ev_install_space_handler (
  164. struct acpi_namespace_node *node,
  165. acpi_adr_space_type space_id,
  166. acpi_adr_space_handler handler,
  167. acpi_adr_space_setup setup,
  168. void *context);
  169. acpi_status
  170. acpi_ev_execute_reg_methods (
  171. struct acpi_namespace_node *node,
  172. acpi_adr_space_type space_id);
  173. acpi_status
  174. acpi_ev_execute_reg_method (
  175. union acpi_operand_object *region_obj,
  176. u32 function);
  177. /*
  178. * evregini - Region initialization and setup
  179. */
  180. acpi_status
  181. acpi_ev_system_memory_region_setup (
  182. acpi_handle handle,
  183. u32 function,
  184. void *handler_context,
  185. void **region_context);
  186. acpi_status
  187. acpi_ev_io_space_region_setup (
  188. acpi_handle handle,
  189. u32 function,
  190. void *handler_context,
  191. void **region_context);
  192. acpi_status
  193. acpi_ev_pci_config_region_setup (
  194. acpi_handle handle,
  195. u32 function,
  196. void *handler_context,
  197. void **region_context);
  198. acpi_status
  199. acpi_ev_cmos_region_setup (
  200. acpi_handle handle,
  201. u32 function,
  202. void *handler_context,
  203. void **region_context);
  204. acpi_status
  205. acpi_ev_pci_bar_region_setup (
  206. acpi_handle handle,
  207. u32 function,
  208. void *handler_context,
  209. void **region_context);
  210. acpi_status
  211. acpi_ev_default_region_setup (
  212. acpi_handle handle,
  213. u32 function,
  214. void *handler_context,
  215. void **region_context);
  216. acpi_status
  217. acpi_ev_initialize_region (
  218. union acpi_operand_object *region_obj,
  219. u8 acpi_ns_locked);
  220. /*
  221. * evsci - SCI (System Control Interrupt) handling/dispatch
  222. */
  223. u32 ACPI_SYSTEM_XFACE
  224. acpi_ev_gpe_xrupt_handler (
  225. void *context);
  226. u32
  227. acpi_ev_install_sci_handler (
  228. void);
  229. acpi_status
  230. acpi_ev_remove_sci_handler (
  231. void);
  232. u32
  233. acpi_ev_initialize_sCI (
  234. u32 program_sCI);
  235. void
  236. acpi_ev_terminate (
  237. void);
  238. #endif /* __ACEVENTS_H__ */