summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/include/acpixf.h
blob: 8d293818f908572aa7f88e74d60025be15ba0b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322

/******************************************************************************
 *
 * Name: acpixf.h - External interfaces to the ACPI subsystem
 *
 *****************************************************************************/

/*
 *  Copyright (C) 2000, 2001 R. Byron Moore
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


#ifndef __ACXFACE_H__
#define __ACXFACE_H__

#include "actypes.h"
#include "actbl.h"

/*
 * Global interfaces
 */

ACPI_STATUS
acpi_initialize_subsystem (
	void);

ACPI_STATUS
acpi_enable_subsystem (
	u32                     flags);

ACPI_STATUS
acpi_terminate (
	void);

ACPI_STATUS
acpi_enable (
	void);

ACPI_STATUS
acpi_disable (
	void);

ACPI_STATUS
acpi_get_system_info(
	ACPI_BUFFER             *ret_buffer);

ACPI_STATUS
acpi_format_exception (
	ACPI_STATUS             exception,
	ACPI_BUFFER             *out_buffer);


/*
 * ACPI table manipulation interfaces
 */

ACPI_STATUS
acpi_find_root_pointer (
	ACPI_PHYSICAL_ADDRESS   *rsdp_physical_address);

ACPI_STATUS
acpi_load_tables (
	ACPI_PHYSICAL_ADDRESS   rsdp_physical_address);

ACPI_STATUS
acpi_load_table (
	ACPI_TABLE_HEADER       *table_ptr);

ACPI_STATUS
acpi_unload_table (
	ACPI_TABLE_TYPE         table_type);

ACPI_STATUS
acpi_get_table_header (
	ACPI_TABLE_TYPE         table_type,
	u32                     instance,
	ACPI_TABLE_HEADER       *out_table_header);

ACPI_STATUS
acpi_get_table (
	ACPI_TABLE_TYPE         table_type,
	u32                     instance,
	ACPI_BUFFER             *ret_buffer);


/*
 * Namespace and name interfaces
 */

ACPI_STATUS
acpi_walk_namespace (
	ACPI_OBJECT_TYPE        type,
	ACPI_HANDLE             start_object,
	u32                     max_depth,
	WALK_CALLBACK           user_function,
	void                    *context,
	void *                  *return_value);

ACPI_STATUS
acpi_get_devices (
	NATIVE_CHAR             *HID,
	WALK_CALLBACK           user_function,
	void                    *context,
	void                    **return_value);

ACPI_STATUS
acpi_get_name (
	ACPI_HANDLE             handle,
	u32                     name_type,
	ACPI_BUFFER             *ret_path_ptr);

ACPI_STATUS
acpi_get_handle (
	ACPI_HANDLE             parent,
	ACPI_STRING             pathname,
	ACPI_HANDLE             *ret_handle);


/*
 * Object manipulation and enumeration
 */

ACPI_STATUS
acpi_evaluate_object (
	ACPI_HANDLE             object,
	ACPI_STRING             pathname,
	ACPI_OBJECT_LIST        *parameter_objects,
	ACPI_BUFFER             *return_object_buffer);

ACPI_STATUS
acpi_get_object_info (
	ACPI_HANDLE             device,
	ACPI_DEVICE_INFO        *info);

ACPI_STATUS
acpi_get_next_object (
	ACPI_OBJECT_TYPE        type,
	ACPI_HANDLE             parent,
	ACPI_HANDLE             child,
	ACPI_HANDLE             *out_handle);

ACPI_STATUS
acpi_get_type (
	ACPI_HANDLE             object,
	ACPI_OBJECT_TYPE        *out_type);

ACPI_STATUS
acpi_get_parent (
	ACPI_HANDLE             object,
	ACPI_HANDLE             *out_handle);


/*
 * Acpi_event handler interfaces
 */

ACPI_STATUS
acpi_install_fixed_event_handler (
	u32                     acpi_event,
	FIXED_EVENT_HANDLER     handler,
	void                    *context);

ACPI_STATUS
acpi_remove_fixed_event_handler (
	u32                     acpi_event,
	FIXED_EVENT_HANDLER     handler);

ACPI_STATUS
acpi_install_notify_handler (
	ACPI_HANDLE             device,
	u32                     handler_type,
	NOTIFY_HANDLER          handler,
	void                    *context);

ACPI_STATUS
acpi_remove_notify_handler (
	ACPI_HANDLE             device,
	u32                     handler_type,
	NOTIFY_HANDLER          handler);

ACPI_STATUS
acpi_install_address_space_handler (
	ACPI_HANDLE             device,
	ACPI_ADDRESS_SPACE_TYPE space_id,
	ADDRESS_SPACE_HANDLER   handler,
	ADDRESS_SPACE_SETUP     setup,
	void                    *context);

ACPI_STATUS
acpi_remove_address_space_handler (
	ACPI_HANDLE             device,
	ACPI_ADDRESS_SPACE_TYPE space_id,
	ADDRESS_SPACE_HANDLER   handler);

ACPI_STATUS
acpi_install_gpe_handler (
	u32                     gpe_number,
	u32                     type,
	GPE_HANDLER             handler,
	void                    *context);

ACPI_STATUS
acpi_acquire_global_lock (
	void);

ACPI_STATUS
acpi_release_global_lock (
	void);

ACPI_STATUS
acpi_remove_gpe_handler (
	u32                     gpe_number,
	GPE_HANDLER             handler);

ACPI_STATUS
acpi_enable_event (
	u32                     acpi_event,
	u32                     type);

ACPI_STATUS
acpi_disable_event (
	u32                     acpi_event,
	u32                     type);

ACPI_STATUS
acpi_clear_event (
	u32                     acpi_event,
	u32                     type);

ACPI_STATUS
acpi_get_event_status (
	u32                     acpi_event,
	u32                     type,
	ACPI_EVENT_STATUS       *event_status);

/*
 * Resource interfaces
 */

ACPI_STATUS
acpi_get_current_resources(
	ACPI_HANDLE             device_handle,
	ACPI_BUFFER             *ret_buffer);

ACPI_STATUS
acpi_get_possible_resources(
	ACPI_HANDLE             device_handle,
	ACPI_BUFFER             *ret_buffer);

ACPI_STATUS
acpi_set_current_resources (
	ACPI_HANDLE             device_handle,
	ACPI_BUFFER             *in_buffer);

ACPI_STATUS
acpi_get_irq_routing_table (
	ACPI_HANDLE             bus_device_handle,
	ACPI_BUFFER             *ret_buffer);


/*
 * Hardware (ACPI device) interfaces
 */

ACPI_STATUS
acpi_set_firmware_waking_vector (
	ACPI_PHYSICAL_ADDRESS   physical_address);

ACPI_STATUS
acpi_get_firmware_waking_vector (
	ACPI_PHYSICAL_ADDRESS   *physical_address);

ACPI_STATUS
acpi_enter_sleep_state (
	u8 sleep_state);

ACPI_STATUS
acpi_get_processor_throttling_info (
	ACPI_HANDLE             processor_handle,
	ACPI_BUFFER             *user_buffer);

ACPI_STATUS
acpi_set_processor_throttling_state (
	ACPI_HANDLE             processor_handle,
	u32                     throttle_state);

ACPI_STATUS
acpi_get_processor_throttling_state (
	ACPI_HANDLE             processor_handle,
	u32                     *throttle_state);

ACPI_STATUS
acpi_get_processor_cx_info (
	ACPI_HANDLE             processor_handle,
	ACPI_BUFFER             *user_buffer);

ACPI_STATUS
acpi_set_processor_sleep_state (
	ACPI_HANDLE             processor_handle,
	u32                     cx_state);

ACPI_STATUS
acpi_processor_sleep (
	ACPI_HANDLE             processor_handle,
	u32                     *pm_timer_ticks);


#endif /* __ACXFACE_H__ */