diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 00:44:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:45:14 -0400 |
commit | 4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch) | |
tree | 5b5b7d296ea58786f53b95e5eac9565ff66890b0 /include/acpi/acparser.h | |
parent | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff) |
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acparser.h')
-rw-r--r-- | include/acpi/acparser.h | 248 |
1 files changed, 75 insertions, 173 deletions
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index f692ad56cd82..d352d40de1f3 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h | |||
@@ -41,18 +41,15 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #ifndef __ACPARSER_H__ | 44 | #ifndef __ACPARSER_H__ |
46 | #define __ACPARSER_H__ | 45 | #define __ACPARSER_H__ |
47 | 46 | ||
48 | |||
49 | #define OP_HAS_RETURN_VALUE 1 | 47 | #define OP_HAS_RETURN_VALUE 1 |
50 | 48 | ||
51 | /* variable # arguments */ | 49 | /* variable # arguments */ |
52 | 50 | ||
53 | #define ACPI_VAR_ARGS ACPI_UINT32_MAX | 51 | #define ACPI_VAR_ARGS ACPI_UINT32_MAX |
54 | 52 | ||
55 | |||
56 | #define ACPI_PARSE_DELETE_TREE 0x0001 | 53 | #define ACPI_PARSE_DELETE_TREE 0x0001 |
57 | #define ACPI_PARSE_NO_TREE_DELETE 0x0000 | 54 | #define ACPI_PARSE_NO_TREE_DELETE 0x0000 |
58 | #define ACPI_PARSE_TREE_MASK 0x0001 | 55 | #define ACPI_PARSE_TREE_MASK 0x0001 |
@@ -65,266 +62,171 @@ | |||
65 | #define ACPI_PARSE_DEFERRED_OP 0x0100 | 62 | #define ACPI_PARSE_DEFERRED_OP 0x0100 |
66 | #define ACPI_PARSE_DISASSEMBLE 0x0200 | 63 | #define ACPI_PARSE_DISASSEMBLE 0x0200 |
67 | 64 | ||
68 | |||
69 | /****************************************************************************** | 65 | /****************************************************************************** |
70 | * | 66 | * |
71 | * Parser interfaces | 67 | * Parser interfaces |
72 | * | 68 | * |
73 | *****************************************************************************/ | 69 | *****************************************************************************/ |
74 | 70 | ||
75 | |||
76 | /* | 71 | /* |
77 | * psxface - Parser external interfaces | 72 | * psxface - Parser external interfaces |
78 | */ | 73 | */ |
79 | acpi_status | 74 | acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info); |
80 | acpi_ps_execute_method ( | ||
81 | struct acpi_parameter_info *info); | ||
82 | |||
83 | 75 | ||
84 | /* | 76 | /* |
85 | * psargs - Parse AML opcode arguments | 77 | * psargs - Parse AML opcode arguments |
86 | */ | 78 | */ |
87 | u8 * | 79 | u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state); |
88 | acpi_ps_get_next_package_end ( | ||
89 | struct acpi_parse_state *parser_state); | ||
90 | 80 | ||
91 | char * | 81 | char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state); |
92 | acpi_ps_get_next_namestring ( | ||
93 | struct acpi_parse_state *parser_state); | ||
94 | 82 | ||
95 | void | 83 | void |
96 | acpi_ps_get_next_simple_arg ( | 84 | acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, |
97 | struct acpi_parse_state *parser_state, | 85 | u32 arg_type, union acpi_parse_object *arg); |
98 | u32 arg_type, | ||
99 | union acpi_parse_object *arg); | ||
100 | 86 | ||
101 | acpi_status | 87 | acpi_status |
102 | acpi_ps_get_next_namepath ( | 88 | acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, |
103 | struct acpi_walk_state *walk_state, | 89 | struct acpi_parse_state *parser_state, |
104 | struct acpi_parse_state *parser_state, | 90 | union acpi_parse_object *arg, u8 method_call); |
105 | union acpi_parse_object *arg, | ||
106 | u8 method_call); | ||
107 | 91 | ||
108 | acpi_status | 92 | acpi_status |
109 | acpi_ps_get_next_arg ( | 93 | acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, |
110 | struct acpi_walk_state *walk_state, | 94 | struct acpi_parse_state *parser_state, |
111 | struct acpi_parse_state *parser_state, | 95 | u32 arg_type, union acpi_parse_object **return_arg); |
112 | u32 arg_type, | ||
113 | union acpi_parse_object **return_arg); | ||
114 | |||
115 | 96 | ||
116 | /* | 97 | /* |
117 | * psfind | 98 | * psfind |
118 | */ | 99 | */ |
119 | union acpi_parse_object * | 100 | union acpi_parse_object *acpi_ps_find_name(union acpi_parse_object *scope, |
120 | acpi_ps_find_name ( | 101 | u32 name, u32 opcode); |
121 | union acpi_parse_object *scope, | ||
122 | u32 name, | ||
123 | u32 opcode); | ||
124 | |||
125 | union acpi_parse_object* | ||
126 | acpi_ps_get_parent ( | ||
127 | union acpi_parse_object *op); | ||
128 | 102 | ||
103 | union acpi_parse_object *acpi_ps_get_parent(union acpi_parse_object *op); | ||
129 | 104 | ||
130 | /* | 105 | /* |
131 | * psopcode - AML Opcode information | 106 | * psopcode - AML Opcode information |
132 | */ | 107 | */ |
133 | const struct acpi_opcode_info * | 108 | const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode); |
134 | acpi_ps_get_opcode_info ( | ||
135 | u16 opcode); | ||
136 | |||
137 | char * | ||
138 | acpi_ps_get_opcode_name ( | ||
139 | u16 opcode); | ||
140 | 109 | ||
110 | char *acpi_ps_get_opcode_name(u16 opcode); | ||
141 | 111 | ||
142 | /* | 112 | /* |
143 | * psparse - top level parsing routines | 113 | * psparse - top level parsing routines |
144 | */ | 114 | */ |
145 | acpi_status | 115 | acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state); |
146 | acpi_ps_parse_aml ( | ||
147 | struct acpi_walk_state *walk_state); | ||
148 | 116 | ||
149 | u32 | 117 | u32 acpi_ps_get_opcode_size(u32 opcode); |
150 | acpi_ps_get_opcode_size ( | ||
151 | u32 opcode); | ||
152 | 118 | ||
153 | u16 | 119 | u16 acpi_ps_peek_opcode(struct acpi_parse_state *state); |
154 | acpi_ps_peek_opcode ( | ||
155 | struct acpi_parse_state *state); | ||
156 | 120 | ||
157 | acpi_status | 121 | acpi_status |
158 | acpi_ps_complete_this_op ( | 122 | acpi_ps_complete_this_op(struct acpi_walk_state *walk_state, |
159 | struct acpi_walk_state *walk_state, | 123 | union acpi_parse_object *op); |
160 | union acpi_parse_object *op); | ||
161 | 124 | ||
162 | acpi_status | 125 | acpi_status |
163 | acpi_ps_next_parse_state ( | 126 | acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, |
164 | struct acpi_walk_state *walk_state, | 127 | union acpi_parse_object *op, |
165 | union acpi_parse_object *op, | 128 | acpi_status callback_status); |
166 | acpi_status callback_status); | ||
167 | |||
168 | 129 | ||
169 | /* | 130 | /* |
170 | * psloop - main parse loop | 131 | * psloop - main parse loop |
171 | */ | 132 | */ |
172 | acpi_status | 133 | acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state); |
173 | acpi_ps_parse_loop ( | ||
174 | struct acpi_walk_state *walk_state); | ||
175 | |||
176 | 134 | ||
177 | /* | 135 | /* |
178 | * psscope - Scope stack management routines | 136 | * psscope - Scope stack management routines |
179 | */ | 137 | */ |
180 | acpi_status | 138 | acpi_status |
181 | acpi_ps_init_scope ( | 139 | acpi_ps_init_scope(struct acpi_parse_state *parser_state, |
182 | struct acpi_parse_state *parser_state, | 140 | union acpi_parse_object *root); |
183 | union acpi_parse_object *root); | ||
184 | 141 | ||
185 | union acpi_parse_object * | 142 | union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state |
186 | acpi_ps_get_parent_scope ( | 143 | *state); |
187 | struct acpi_parse_state *state); | ||
188 | 144 | ||
189 | u8 | 145 | u8 acpi_ps_has_completed_scope(struct acpi_parse_state *parser_state); |
190 | acpi_ps_has_completed_scope ( | ||
191 | struct acpi_parse_state *parser_state); | ||
192 | 146 | ||
193 | void | 147 | void |
194 | acpi_ps_pop_scope ( | 148 | acpi_ps_pop_scope(struct acpi_parse_state *parser_state, |
195 | struct acpi_parse_state *parser_state, | 149 | union acpi_parse_object **op, |
196 | union acpi_parse_object **op, | 150 | u32 * arg_list, u32 * arg_count); |
197 | u32 *arg_list, | ||
198 | u32 *arg_count); | ||
199 | 151 | ||
200 | acpi_status | 152 | acpi_status |
201 | acpi_ps_push_scope ( | 153 | acpi_ps_push_scope(struct acpi_parse_state *parser_state, |
202 | struct acpi_parse_state *parser_state, | 154 | union acpi_parse_object *op, |
203 | union acpi_parse_object *op, | 155 | u32 remaining_args, u32 arg_count); |
204 | u32 remaining_args, | ||
205 | u32 arg_count); | ||
206 | |||
207 | void | ||
208 | acpi_ps_cleanup_scope ( | ||
209 | struct acpi_parse_state *state); | ||
210 | 156 | ||
157 | void acpi_ps_cleanup_scope(struct acpi_parse_state *state); | ||
211 | 158 | ||
212 | /* | 159 | /* |
213 | * pstree - parse tree manipulation routines | 160 | * pstree - parse tree manipulation routines |
214 | */ | 161 | */ |
215 | void | 162 | void |
216 | acpi_ps_append_arg( | 163 | acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg); |
217 | union acpi_parse_object *op, | ||
218 | union acpi_parse_object *arg); | ||
219 | |||
220 | union acpi_parse_object* | ||
221 | acpi_ps_find ( | ||
222 | union acpi_parse_object *scope, | ||
223 | char *path, | ||
224 | u16 opcode, | ||
225 | u32 create); | ||
226 | |||
227 | union acpi_parse_object * | ||
228 | acpi_ps_get_arg( | ||
229 | union acpi_parse_object *op, | ||
230 | u32 argn); | ||
231 | 164 | ||
232 | #ifdef ACPI_FUTURE_USAGE | 165 | union acpi_parse_object *acpi_ps_find(union acpi_parse_object *scope, |
233 | union acpi_parse_object * | 166 | char *path, u16 opcode, u32 create); |
234 | acpi_ps_get_depth_next ( | 167 | |
235 | union acpi_parse_object *origin, | 168 | union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn); |
236 | union acpi_parse_object *op); | ||
237 | #endif /* ACPI_FUTURE_USAGE */ | ||
238 | 169 | ||
170 | #ifdef ACPI_FUTURE_USAGE | ||
171 | union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin, | ||
172 | union acpi_parse_object *op); | ||
173 | #endif /* ACPI_FUTURE_USAGE */ | ||
239 | 174 | ||
240 | /* | 175 | /* |
241 | * pswalk - parse tree walk routines | 176 | * pswalk - parse tree walk routines |
242 | */ | 177 | */ |
243 | acpi_status | 178 | acpi_status |
244 | acpi_ps_walk_parsed_aml ( | 179 | acpi_ps_walk_parsed_aml(union acpi_parse_object *start_op, |
245 | union acpi_parse_object *start_op, | 180 | union acpi_parse_object *end_op, |
246 | union acpi_parse_object *end_op, | 181 | union acpi_operand_object *mth_desc, |
247 | union acpi_operand_object *mth_desc, | 182 | struct acpi_namespace_node *start_node, |
248 | struct acpi_namespace_node *start_node, | 183 | union acpi_operand_object **params, |
249 | union acpi_operand_object **params, | 184 | union acpi_operand_object **caller_return_desc, |
250 | union acpi_operand_object **caller_return_desc, | 185 | acpi_owner_id owner_id, |
251 | acpi_owner_id owner_id, | 186 | acpi_parse_downwards descending_callback, |
252 | acpi_parse_downwards descending_callback, | 187 | acpi_parse_upwards ascending_callback); |
253 | acpi_parse_upwards ascending_callback); | ||
254 | |||
255 | acpi_status | ||
256 | acpi_ps_get_next_walk_op ( | ||
257 | struct acpi_walk_state *walk_state, | ||
258 | union acpi_parse_object *op, | ||
259 | acpi_parse_upwards ascending_callback); | ||
260 | 188 | ||
261 | acpi_status | 189 | acpi_status |
262 | acpi_ps_delete_completed_op ( | 190 | acpi_ps_get_next_walk_op(struct acpi_walk_state *walk_state, |
263 | struct acpi_walk_state *walk_state); | 191 | union acpi_parse_object *op, |
192 | acpi_parse_upwards ascending_callback); | ||
264 | 193 | ||
265 | void | 194 | acpi_status acpi_ps_delete_completed_op(struct acpi_walk_state *walk_state); |
266 | acpi_ps_delete_parse_tree ( | ||
267 | union acpi_parse_object *root); | ||
268 | 195 | ||
196 | void acpi_ps_delete_parse_tree(union acpi_parse_object *root); | ||
269 | 197 | ||
270 | /* | 198 | /* |
271 | * psutils - parser utilities | 199 | * psutils - parser utilities |
272 | */ | 200 | */ |
273 | union acpi_parse_object * | 201 | union acpi_parse_object *acpi_ps_create_scope_op(void); |
274 | acpi_ps_create_scope_op ( | ||
275 | void); | ||
276 | 202 | ||
277 | void | 203 | void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode); |
278 | acpi_ps_init_op ( | ||
279 | union acpi_parse_object *op, | ||
280 | u16 opcode); | ||
281 | 204 | ||
282 | union acpi_parse_object * | 205 | union acpi_parse_object *acpi_ps_alloc_op(u16 opcode); |
283 | acpi_ps_alloc_op ( | ||
284 | u16 opcode); | ||
285 | 206 | ||
286 | void | 207 | void acpi_ps_free_op(union acpi_parse_object *op); |
287 | acpi_ps_free_op ( | ||
288 | union acpi_parse_object *op); | ||
289 | 208 | ||
290 | u8 | 209 | u8 acpi_ps_is_leading_char(u32 c); |
291 | acpi_ps_is_leading_char ( | ||
292 | u32 c); | ||
293 | 210 | ||
294 | u8 | 211 | u8 acpi_ps_is_prefix_char(u32 c); |
295 | acpi_ps_is_prefix_char ( | ||
296 | u32 c); | ||
297 | 212 | ||
298 | #ifdef ACPI_FUTURE_USAGE | 213 | #ifdef ACPI_FUTURE_USAGE |
299 | u32 | 214 | u32 acpi_ps_get_name(union acpi_parse_object *op); |
300 | acpi_ps_get_name( | 215 | #endif /* ACPI_FUTURE_USAGE */ |
301 | union acpi_parse_object *op); | ||
302 | #endif /* ACPI_FUTURE_USAGE */ | ||
303 | |||
304 | void | ||
305 | acpi_ps_set_name( | ||
306 | union acpi_parse_object *op, | ||
307 | u32 name); | ||
308 | 216 | ||
217 | void acpi_ps_set_name(union acpi_parse_object *op, u32 name); | ||
309 | 218 | ||
310 | /* | 219 | /* |
311 | * psdump - display parser tree | 220 | * psdump - display parser tree |
312 | */ | 221 | */ |
313 | u32 | 222 | u32 |
314 | acpi_ps_sprint_path ( | 223 | acpi_ps_sprint_path(char *buffer_start, |
315 | char *buffer_start, | 224 | u32 buffer_size, union acpi_parse_object *op); |
316 | u32 buffer_size, | ||
317 | union acpi_parse_object *op); | ||
318 | 225 | ||
319 | u32 | 226 | u32 |
320 | acpi_ps_sprint_op ( | 227 | acpi_ps_sprint_op(char *buffer_start, |
321 | char *buffer_start, | 228 | u32 buffer_size, union acpi_parse_object *op); |
322 | u32 buffer_size, | ||
323 | union acpi_parse_object *op); | ||
324 | |||
325 | void | ||
326 | acpi_ps_show ( | ||
327 | union acpi_parse_object *op); | ||
328 | 229 | ||
230 | void acpi_ps_show(union acpi_parse_object *op); | ||
329 | 231 | ||
330 | #endif /* __ACPARSER_H__ */ | 232 | #endif /* __ACPARSER_H__ */ |