:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / drivers / bus / acpi / include / acevents.h
1 /******************************************************************************
2  *
3  * Name: acevents.h - Event subcomponent prototypes and defines
4  *       $Revision$
5  *
6  *****************************************************************************/
7
8 /*
9  *  Copyright (C) 2000, 2001 R. Byron Moore
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26 #ifndef __ACEVENTS_H__
27 #define __ACEVENTS_H__
28
29
30 ACPI_STATUS
31 acpi_ev_initialize (
32         void);
33
34
35 /*
36  * Acpi_evfixed - Fixed event handling
37  */
38
39 ACPI_STATUS
40 acpi_ev_fixed_event_initialize (
41         void);
42
43 u32
44 acpi_ev_fixed_event_detect (
45         void);
46
47 u32
48 acpi_ev_fixed_event_dispatch (
49         u32                     acpi_event);
50
51
52 /*
53  * Acpi_evglock - Global Lock support
54  */
55
56 ACPI_STATUS
57 acpi_ev_acquire_global_lock(
58         void);
59
60 void
61 acpi_ev_release_global_lock(
62         void);
63
64 ACPI_STATUS
65 acpi_ev_init_global_lock_handler (
66         void);
67
68
69 /*
70  * Acpi_evgpe - GPE handling and dispatch
71  */
72
73 ACPI_STATUS
74 acpi_ev_gpe_initialize (
75         void);
76
77 ACPI_STATUS
78 acpi_ev_init_gpe_control_methods (
79         void);
80
81 u32
82 acpi_ev_gpe_dispatch (
83         u32                     gpe_number);
84
85 u32
86 acpi_ev_gpe_detect (
87         void);
88
89
90 /*
91  * Acpi_evnotify - Device Notify handling and dispatch
92  */
93
94 ACPI_STATUS
95 acpi_ev_queue_notify_request (
96         ACPI_NAMESPACE_NODE     *node,
97         u32                     notify_value);
98
99 void
100 acpi_ev_notify_dispatch (
101         void                    *context);
102
103 /*
104  * Acpi_evregion - Address Space handling
105  */
106
107 ACPI_STATUS
108 acpi_ev_install_default_address_space_handlers (
109         void);
110
111 ACPI_STATUS
112 acpi_ev_address_space_dispatch (
113         ACPI_OPERAND_OBJECT    *region_obj,
114         u32                     function,
115         ACPI_PHYSICAL_ADDRESS   address,
116         u32                     bit_width,
117         u32                     *value);
118
119
120 ACPI_STATUS
121 acpi_ev_addr_handler_helper (
122         ACPI_HANDLE             obj_handle,
123         u32                     level,
124         void                    *context,
125         void                    **return_value);
126
127 void
128 acpi_ev_disassociate_region_from_handler(
129         ACPI_OPERAND_OBJECT    *region_obj,
130         u8                      acpi_ns_is_locked);
131
132
133 ACPI_STATUS
134 acpi_ev_associate_region_and_handler (
135         ACPI_OPERAND_OBJECT     *handler_obj,
136         ACPI_OPERAND_OBJECT     *region_obj,
137         u8                      acpi_ns_is_locked);
138
139
140 /*
141  * Acpi_evregini - Region initialization and setup
142  */
143
144 ACPI_STATUS
145 acpi_ev_system_memory_region_setup (
146         ACPI_HANDLE             handle,
147         u32                     function,
148         void                    *handler_context,
149         void                    **region_context);
150
151 ACPI_STATUS
152 acpi_ev_io_space_region_setup (
153         ACPI_HANDLE             handle,
154         u32                     function,
155         void                    *handler_context,
156         void                    **region_context);
157
158 ACPI_STATUS
159 acpi_ev_pci_config_region_setup (
160         ACPI_HANDLE             handle,
161         u32                     function,
162         void                    *handler_context,
163         void                    **region_context);
164
165 ACPI_STATUS
166 acpi_ev_default_region_setup (
167         ACPI_HANDLE             handle,
168         u32                     function,
169         void                    *handler_context,
170         void                    **region_context);
171
172 ACPI_STATUS
173 acpi_ev_initialize_region (
174         ACPI_OPERAND_OBJECT     *region_obj,
175         u8                      acpi_ns_locked);
176
177
178 /*
179  * Evsci - SCI (System Control Interrupt) handling/dispatch
180  */
181
182 u32
183 acpi_ev_install_sci_handler (
184         void);
185
186 ACPI_STATUS
187 acpi_ev_remove_sci_handler (
188         void);
189
190 u32
191 acpi_ev_initialize_sCI (
192         u32                     program_sCI);
193
194 void
195 acpi_ev_restore_acpi_state (
196         void);
197
198 void
199 acpi_ev_terminate (
200         void);
201
202
203 #endif  /* __ACEVENTS_H__  */