Lines Matching +full:user +full:- +full:level

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: nswalk - Functions for walking the ACPI namespace
6 * Copyright (C) 2000 - 2022, Intel Corp.
21 * PARAMETERS: parent_node - Parent node whose children we are
23 * child_node - Previous child that was found.
26 * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
45 return (parent_node->child); in acpi_ns_get_next_node()
50 return (child_node->peer); in acpi_ns_get_next_node()
57 * PARAMETERS: type - Type of node to be searched for
58 * parent_node - Parent node whose children we are
60 * child_node - Previous child that was found.
63 * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
91 /* next_node is NULL if we are at the end-of-list */ in acpi_ns_get_next_node_typed()
96 /* Must search for the node -- but within this scope only */ in acpi_ns_get_next_node_typed()
102 if (next_node->type == type) { in acpi_ns_get_next_node_typed()
108 next_node = next_node->peer; in acpi_ns_get_next_node_typed()
120 * PARAMETERS: type - acpi_object_type to search for
121 * start_node - Handle in namespace where search begins
122 * max_depth - Depth to which search is to reach
123 * flags - Whether to unlock the NS before invoking
125 * descending_callback - Called during tree descent
127 * ascending_callback - Called during tree ascent
129 * context - Passed to user function(s) above
130 * return_value - from the user_function if terminated
134 * DESCRIPTION: Performs a modified depth-first walk of the namespace tree,
138 * a non-zero value, the search is terminated immediately and
163 u32 level; in acpi_ns_walk_namespace() local
182 level = 1; in acpi_ns_walk_namespace()
186 * started. When Level is zero, the loop is done because we have in acpi_ns_walk_namespace()
189 while (level > 0 && child_node) { in acpi_ns_walk_namespace()
195 child_type = child_node->type; in acpi_ns_walk_namespace()
202 * the execution of the user function (if the namespace is in acpi_ns_walk_namespace()
203 * unlocked before invocation of the user function.) Only the in acpi_ns_walk_namespace()
206 if ((child_node->flags & ANOBJ_TEMPORARY) && in acpi_ns_walk_namespace()
215 * Found a matching node, invoke the user callback function. in acpi_ns_walk_namespace()
227 * Invoke the user function, either descending, ascending, in acpi_ns_walk_namespace()
234 level, context, in acpi_ns_walk_namespace()
241 level, context, in acpi_ns_walk_namespace()
276 * Depth first search: Attempt to go down another level in the in acpi_ns_walk_namespace()
278 * reached the caller specified maximum depth or if the user in acpi_ns_walk_namespace()
282 (level < max_depth) && (status != AE_CTRL_DEPTH)) { in acpi_ns_walk_namespace()
283 if (child_node->child) { in acpi_ns_walk_namespace()
287 level++; in acpi_ns_walk_namespace()
295 /* No more children, re-visit this node */ in acpi_ns_walk_namespace()
309 /* No peers, re-visit parent */ in acpi_ns_walk_namespace()
316 level--; in acpi_ns_walk_namespace()
318 parent_node = parent_node->parent; in acpi_ns_walk_namespace()
324 /* Complete walk, not terminated by user function */ in acpi_ns_walk_namespace()