Lines Matching +full:child +full:- +full:node

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 - 2023, Intel Corp.
21 * PARAMETERS: parent_node - Parent node whose children we are
23 * child_node - Previous child that was found.
24 * The NEXT child will be returned
26 * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
29 * DESCRIPTION: Return the next peer node within the namespace. If Handle
30 * is valid, Scope is ignored. Otherwise, the first node
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.
61 * The NEXT child will be returned
63 * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
66 * DESCRIPTION: Return the next peer node within the namespace. If Handle
67 * is valid, Scope is ignored. Otherwise, the first node
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()
106 /* Otherwise, move on to the next peer node */ 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,
135 * starting (and ending) at the node specified by start_handle.
136 * The callback function is called whenever a node that matches
138 * a non-zero value, the search is terminated immediately and
168 /* Special case for the namespace Root Node */ in acpi_ns_walk_namespace()
177 /* Null child means "get first node" */ in acpi_ns_walk_namespace()
192 /* Found next child, get the type if we are not searching for ANY */ in acpi_ns_walk_namespace()
195 child_type = child_node->type; 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()
283 if (child_node->child) { in acpi_ns_walk_namespace()
285 /* There is at least one child of this node, visit it */ 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()
313 * No more children of this node (acpi_ns_get_next_node failed), go in acpi_ns_walk_namespace()
314 * back upwards in the namespace tree to the node's parent. in acpi_ns_walk_namespace()
316 level--; in acpi_ns_walk_namespace()
318 parent_node = parent_node->parent; in acpi_ns_walk_namespace()