aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acnamesp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acnamesp.h')
-rw-r--r--include/acpi/acnamesp.h357
1 files changed, 118 insertions, 239 deletions
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index 0c9ba707925b..dd3501f7e5d6 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -44,7 +44,6 @@
44#ifndef __ACNAMESP_H__ 44#ifndef __ACNAMESP_H__
45#define __ACNAMESP_H__ 45#define __ACNAMESP_H__
46 46
47
48/* To search the entire name space, pass this as search_base */ 47/* To search the entire name space, pass this as search_base */
49 48
50#define ACPI_NS_ALL ((acpi_handle)0) 49#define ACPI_NS_ALL ((acpi_handle)0)
@@ -54,8 +53,8 @@
54 * and should be one-to-one with values of acpi_object_type 53 * and should be one-to-one with values of acpi_object_type
55 */ 54 */
56#define ACPI_NS_NORMAL 0 55#define ACPI_NS_NORMAL 0
57#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */ 56#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
58#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */ 57#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
59 58
60/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */ 59/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
61 60
@@ -68,357 +67,237 @@
68#define ACPI_NS_WALK_UNLOCK TRUE 67#define ACPI_NS_WALK_UNLOCK TRUE
69#define ACPI_NS_WALK_NO_UNLOCK FALSE 68#define ACPI_NS_WALK_NO_UNLOCK FALSE
70 69
71
72/* 70/*
73 * nsinit - Namespace initialization 71 * nsinit - Namespace initialization
74 */ 72 */
75acpi_status 73acpi_status acpi_ns_initialize_objects(void);
76acpi_ns_initialize_objects (
77 void);
78
79acpi_status
80acpi_ns_initialize_devices (
81 void);
82 74
75acpi_status acpi_ns_initialize_devices(void);
83 76
84/* 77/*
85 * nsload - Namespace loading 78 * nsload - Namespace loading
86 */ 79 */
87acpi_status 80acpi_status acpi_ns_load_namespace(void);
88acpi_ns_load_namespace (
89 void);
90 81
91acpi_status 82acpi_status
92acpi_ns_load_table ( 83acpi_ns_load_table(struct acpi_table_desc *table_desc,
93 struct acpi_table_desc *table_desc, 84 struct acpi_namespace_node *node);
94 struct acpi_namespace_node *node);
95
96 85
97/* 86/*
98 * nswalk - walk the namespace 87 * nswalk - walk the namespace
99 */ 88 */
100acpi_status 89acpi_status
101acpi_ns_walk_namespace ( 90acpi_ns_walk_namespace(acpi_object_type type,
102 acpi_object_type type, 91 acpi_handle start_object,
103 acpi_handle start_object, 92 u32 max_depth,
104 u32 max_depth, 93 u8 unlock_before_callback,
105 u8 unlock_before_callback, 94 acpi_walk_callback user_function,
106 acpi_walk_callback user_function, 95 void *context, void **return_value);
107 void *context, 96
108 void **return_value); 97struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type,
109 98 struct acpi_namespace_node
110struct acpi_namespace_node * 99 *parent,
111acpi_ns_get_next_node ( 100 struct acpi_namespace_node
112 acpi_object_type type, 101 *child);
113 struct acpi_namespace_node *parent,
114 struct acpi_namespace_node *child);
115
116 102
117/* 103/*
118 * nsparse - table parsing 104 * nsparse - table parsing
119 */ 105 */
120acpi_status 106acpi_status
121acpi_ns_parse_table ( 107acpi_ns_parse_table(struct acpi_table_desc *table_desc,
122 struct acpi_table_desc *table_desc, 108 struct acpi_namespace_node *scope);
123 struct acpi_namespace_node *scope);
124 109
125acpi_status 110acpi_status
126acpi_ns_one_complete_parse ( 111acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc);
127 u8 pass_number,
128 struct acpi_table_desc *table_desc);
129
130 112
131/* 113/*
132 * nsaccess - Top-level namespace access 114 * nsaccess - Top-level namespace access
133 */ 115 */
134acpi_status 116acpi_status acpi_ns_root_initialize(void);
135acpi_ns_root_initialize (
136 void);
137 117
138acpi_status 118acpi_status
139acpi_ns_lookup ( 119acpi_ns_lookup(union acpi_generic_state *scope_info,
140 union acpi_generic_state *scope_info, 120 char *name,
141 char *name, 121 acpi_object_type type,
142 acpi_object_type type, 122 acpi_interpreter_mode interpreter_mode,
143 acpi_interpreter_mode interpreter_mode, 123 u32 flags,
144 u32 flags, 124 struct acpi_walk_state *walk_state,
145 struct acpi_walk_state *walk_state, 125 struct acpi_namespace_node **ret_node);
146 struct acpi_namespace_node **ret_node);
147
148 126
149/* 127/*
150 * nsalloc - Named object allocation/deallocation 128 * nsalloc - Named object allocation/deallocation
151 */ 129 */
152struct acpi_namespace_node * 130struct acpi_namespace_node *acpi_ns_create_node(u32 name);
153acpi_ns_create_node (
154 u32 name);
155
156void
157acpi_ns_delete_node (
158 struct acpi_namespace_node *node);
159 131
160void 132void acpi_ns_delete_node(struct acpi_namespace_node *node);
161acpi_ns_delete_namespace_subtree (
162 struct acpi_namespace_node *parent_handle);
163 133
164void 134void
165acpi_ns_delete_namespace_by_owner ( 135acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
166 acpi_owner_id owner_id);
167 136
168void 137void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
169acpi_ns_detach_object (
170 struct acpi_namespace_node *node);
171 138
172void 139void acpi_ns_detach_object(struct acpi_namespace_node *node);
173acpi_ns_delete_children (
174 struct acpi_namespace_node *parent);
175 140
176int 141void acpi_ns_delete_children(struct acpi_namespace_node *parent);
177acpi_ns_compare_names (
178 char *name1,
179 char *name2);
180 142
143int acpi_ns_compare_names(char *name1, char *name2);
181 144
182/* 145/*
183 * nsdump - Namespace dump/print utilities 146 * nsdump - Namespace dump/print utilities
184 */ 147 */
185#ifdef ACPI_FUTURE_USAGE 148#ifdef ACPI_FUTURE_USAGE
186void 149void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
187acpi_ns_dump_tables ( 150#endif /* ACPI_FUTURE_USAGE */
188 acpi_handle search_base,
189 u32 max_depth);
190#endif /* ACPI_FUTURE_USAGE */
191 151
192void 152void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
193acpi_ns_dump_entry (
194 acpi_handle handle,
195 u32 debug_level);
196 153
197void 154void
198acpi_ns_dump_pathname ( 155acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component);
199 acpi_handle handle,
200 char *msg,
201 u32 level,
202 u32 component);
203 156
204void 157void acpi_ns_print_pathname(u32 num_segments, char *pathname);
205acpi_ns_print_pathname (
206 u32 num_segments,
207 char *pathname);
208 158
209acpi_status 159acpi_status
210acpi_ns_dump_one_object ( 160acpi_ns_dump_one_object(acpi_handle obj_handle,
211 acpi_handle obj_handle, 161 u32 level, void *context, void **return_value);
212 u32 level,
213 void *context,
214 void **return_value);
215 162
216#ifdef ACPI_FUTURE_USAGE 163#ifdef ACPI_FUTURE_USAGE
217void 164void
218acpi_ns_dump_objects ( 165acpi_ns_dump_objects(acpi_object_type type,
219 acpi_object_type type, 166 u8 display_type,
220 u8 display_type, 167 u32 max_depth,
221 u32 max_depth, 168 acpi_owner_id owner_id, acpi_handle start_handle);
222 acpi_owner_id owner_id, 169#endif /* ACPI_FUTURE_USAGE */
223 acpi_handle start_handle);
224#endif /* ACPI_FUTURE_USAGE */
225
226 170
227/* 171/*
228 * nseval - Namespace evaluation functions 172 * nseval - Namespace evaluation functions
229 */ 173 */
230acpi_status 174acpi_status acpi_ns_evaluate_by_handle(struct acpi_parameter_info *info);
231acpi_ns_evaluate_by_handle (
232 struct acpi_parameter_info *info);
233 175
234acpi_status 176acpi_status
235acpi_ns_evaluate_by_name ( 177acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info);
236 char *pathname,
237 struct acpi_parameter_info *info);
238 178
239acpi_status 179acpi_status
240acpi_ns_evaluate_relative ( 180acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info);
241 char *pathname,
242 struct acpi_parameter_info *info);
243
244 181
245/* 182/*
246 * nsnames - Name and Scope manipulation 183 * nsnames - Name and Scope manipulation
247 */ 184 */
248u32 185u32 acpi_ns_opens_scope(acpi_object_type type);
249acpi_ns_opens_scope (
250 acpi_object_type type);
251 186
252char * 187char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
253acpi_ns_get_external_pathname (
254 struct acpi_namespace_node *node);
255 188
256char * 189char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
257acpi_ns_name_of_current_scope (
258 struct acpi_walk_state *walk_state);
259 190
260acpi_status 191acpi_status
261acpi_ns_handle_to_pathname ( 192acpi_ns_handle_to_pathname(acpi_handle target_handle,
262 acpi_handle target_handle, 193 struct acpi_buffer *buffer);
263 struct acpi_buffer *buffer);
264 194
265u8 195u8
266acpi_ns_pattern_match ( 196acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
267 struct acpi_namespace_node *obj_node,
268 char *search_for);
269 197
270acpi_status 198acpi_status
271acpi_ns_get_node_by_path ( 199acpi_ns_get_node_by_path(char *external_pathname,
272 char *external_pathname, 200 struct acpi_namespace_node *in_prefix_node,
273 struct acpi_namespace_node *in_prefix_node, 201 u32 flags, struct acpi_namespace_node **out_node);
274 u32 flags,
275 struct acpi_namespace_node **out_node);
276
277acpi_size
278acpi_ns_get_pathname_length (
279 struct acpi_namespace_node *node);
280 202
203acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
281 204
282/* 205/*
283 * nsobject - Object management for namespace nodes 206 * nsobject - Object management for namespace nodes
284 */ 207 */
285acpi_status 208acpi_status
286acpi_ns_attach_object ( 209acpi_ns_attach_object(struct acpi_namespace_node *node,
287 struct acpi_namespace_node *node, 210 union acpi_operand_object *object, acpi_object_type type);
288 union acpi_operand_object *object,
289 acpi_object_type type);
290 211
291union acpi_operand_object * 212union acpi_operand_object *acpi_ns_get_attached_object(struct
292acpi_ns_get_attached_object ( 213 acpi_namespace_node
293 struct acpi_namespace_node *node); 214 *node);
294 215
295union acpi_operand_object * 216union acpi_operand_object *acpi_ns_get_secondary_object(union
296acpi_ns_get_secondary_object ( 217 acpi_operand_object
297 union acpi_operand_object *obj_desc); 218 *obj_desc);
298 219
299acpi_status 220acpi_status
300acpi_ns_attach_data ( 221acpi_ns_attach_data(struct acpi_namespace_node *node,
301 struct acpi_namespace_node *node, 222 acpi_object_handler handler, void *data);
302 acpi_object_handler handler,
303 void *data);
304 223
305acpi_status 224acpi_status
306acpi_ns_detach_data ( 225acpi_ns_detach_data(struct acpi_namespace_node *node,
307 struct acpi_namespace_node *node, 226 acpi_object_handler handler);
308 acpi_object_handler handler);
309 227
310acpi_status 228acpi_status
311acpi_ns_get_attached_data ( 229acpi_ns_get_attached_data(struct acpi_namespace_node *node,
312 struct acpi_namespace_node *node, 230 acpi_object_handler handler, void **data);
313 acpi_object_handler handler,
314 void **data);
315
316 231
317/* 232/*
318 * nssearch - Namespace searching and entry 233 * nssearch - Namespace searching and entry
319 */ 234 */
320acpi_status 235acpi_status
321acpi_ns_search_and_enter ( 236acpi_ns_search_and_enter(u32 entry_name,
322 u32 entry_name, 237 struct acpi_walk_state *walk_state,
323 struct acpi_walk_state *walk_state, 238 struct acpi_namespace_node *node,
324 struct acpi_namespace_node *node, 239 acpi_interpreter_mode interpreter_mode,
325 acpi_interpreter_mode interpreter_mode, 240 acpi_object_type type,
326 acpi_object_type type, 241 u32 flags, struct acpi_namespace_node **ret_node);
327 u32 flags,
328 struct acpi_namespace_node **ret_node);
329 242
330acpi_status 243acpi_status
331acpi_ns_search_node ( 244acpi_ns_search_node(u32 entry_name,
332 u32 entry_name, 245 struct acpi_namespace_node *node,
333 struct acpi_namespace_node *node, 246 acpi_object_type type,
334 acpi_object_type type, 247 struct acpi_namespace_node **ret_node);
335 struct acpi_namespace_node **ret_node);
336 248
337void 249void
338acpi_ns_install_node ( 250acpi_ns_install_node(struct acpi_walk_state *walk_state,
339 struct acpi_walk_state *walk_state, 251 struct acpi_namespace_node *parent_node,
340 struct acpi_namespace_node *parent_node, 252 struct acpi_namespace_node *node, acpi_object_type type);
341 struct acpi_namespace_node *node,
342 acpi_object_type type);
343
344 253
345/* 254/*
346 * nsutils - Utility functions 255 * nsutils - Utility functions
347 */ 256 */
348u8 257u8 acpi_ns_valid_root_prefix(char prefix);
349acpi_ns_valid_root_prefix (
350 char prefix);
351 258
352acpi_object_type 259acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
353acpi_ns_get_type (
354 struct acpi_namespace_node *node);
355 260
356u32 261u32 acpi_ns_local(acpi_object_type type);
357acpi_ns_local (
358 acpi_object_type type);
359 262
360void 263void
361acpi_ns_report_error ( 264acpi_ns_report_error(char *module_name,
362 char *module_name, 265 u32 line_number,
363 u32 line_number, 266 u32 component_id,
364 u32 component_id, 267 char *internal_name, acpi_status lookup_status);
365 char *internal_name,
366 acpi_status lookup_status);
367 268
368void 269void
369acpi_ns_report_method_error ( 270acpi_ns_report_method_error(char *module_name,
370 char *module_name, 271 u32 line_number,
371 u32 line_number, 272 u32 component_id,
372 u32 component_id, 273 char *message,
373 char *message, 274 struct acpi_namespace_node *node,
374 struct acpi_namespace_node *node, 275 char *path, acpi_status lookup_status);
375 char *path,
376 acpi_status lookup_status);
377 276
378void 277void acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *msg);
379acpi_ns_print_node_pathname (
380 struct acpi_namespace_node *node,
381 char *msg);
382 278
383acpi_status 279acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
384acpi_ns_build_internal_name (
385 struct acpi_namestring_info *info);
386 280
387void 281void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
388acpi_ns_get_internal_name_length (
389 struct acpi_namestring_info *info);
390 282
391acpi_status 283acpi_status acpi_ns_internalize_name(char *dotted_name, char **converted_name);
392acpi_ns_internalize_name (
393 char *dotted_name,
394 char **converted_name);
395 284
396acpi_status 285acpi_status
397acpi_ns_externalize_name ( 286acpi_ns_externalize_name(u32 internal_name_length,
398 u32 internal_name_length, 287 char *internal_name,
399 char *internal_name, 288 u32 * converted_name_length, char **converted_name);
400 u32 *converted_name_length,
401 char **converted_name);
402 289
403struct acpi_namespace_node * 290struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);
404acpi_ns_map_handle_to_node (
405 acpi_handle handle);
406 291
407acpi_handle 292acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node);
408acpi_ns_convert_entry_to_handle(
409 struct acpi_namespace_node *node);
410
411void
412acpi_ns_terminate (
413 void);
414 293
415struct acpi_namespace_node * 294void acpi_ns_terminate(void);
416acpi_ns_get_parent_node (
417 struct acpi_namespace_node *node);
418 295
296struct acpi_namespace_node *acpi_ns_get_parent_node(struct acpi_namespace_node
297 *node);
419 298
420struct acpi_namespace_node * 299struct acpi_namespace_node *acpi_ns_get_next_valid_node(struct
421acpi_ns_get_next_valid_node ( 300 acpi_namespace_node
422 struct acpi_namespace_node *node); 301 *node);
423 302
424#endif /* __ACNAMESP_H__ */ 303#endif /* __ACNAMESP_H__ */