Lines Matching defs:tree
3 * Functions for working with device tree overlays
47 * struct fragment - info about fragment nodes in overlay expanded device tree
61 * @overlay_tree: expanded device tree that contains the fragment nodes
63 * @fragments: fragment nodes in the overlay expanded device tree
65 * @cset: changeset to apply fragments to live device tree
98 * of_resolve_phandles() finds the largest phandle in the live tree.
99 * of_overlay_apply() may add a larger phandle to the live tree.
128 * Register for notification on overlay operations on device tree nodes. The
130 * furthermore receives a pointer to the affected device tree node.
133 * tree node or its content beyond @OF_OVERLAY_POST_REMOVE corresponding to the
187 * need to be adjusted to be the correct path for the live device tree.
280 * @overlay_prop: property to add or update, from overlay tree
294 * are already in the live tree, but if present in the live tree, the values
295 * in the overlay must match the values in the live tree.
377 * @target: where @node will be placed in live tree or changeset
378 * @node: node from within overlay device tree fragment
389 * NOTE_1: A live devicetree created from a flattened device tree (FDT) will
467 * @target: where to place @overlay_node in live tree
468 * @overlay_node: node from within an overlay device tree fragment
627 * overlay device tree fragments in @ovcs->fragments[]. If an error occurs,
718 * init_overlay_changeset() - initialize overlay changeset from overlay tree
720 * @fdt: the FDT that was unflattened to create @tree
721 * @tree: Contains all the overlay fragments and overlay fixup nodes
724 * the top level of @tree. The relevant top level nodes are the fragment
728 * detected in @tree, or -ENOSPC if idr_alloc() error.
731 const void *fdt, struct device_node *tree)
742 if (!of_node_check_flag(tree, OF_DYNAMIC))
743 pr_debug("%s() tree is not dynamic\n", __func__);
745 if (!of_node_check_flag(tree, OF_DETACHED))
746 pr_debug("%s() tree is not detached\n", __func__);
748 if (!of_node_is_root(tree))
749 pr_debug("%s() tree is not root\n", __func__);
751 ovcs->overlay_tree = tree;
765 for_each_child_of_node(tree, node) {
773 node = of_get_child_by_name(tree, "__symbols__");
786 for_each_child_of_node(tree, node) {
808 node = of_get_child_by_name(tree, "__symbols__");
816 pr_err("symbols in overlay, but not in live tree\n");
875 * @fdt: the FDT that was unflattened to create @tree
876 * @tree: Expanded overlay device tree
882 * to the device tree.
905 * device tree. If there were any errors during the revert attempt
906 * then the state of the device tree can not be determined, and any
914 static int of_overlay_apply(const void *fdt, struct device_node *tree,
921 * As of this point, fdt and tree belong to the overlay changeset.
928 kfree(tree);
936 kfree(tree);
944 ret = of_resolve_phandles(tree);
948 ret = init_overlay_changeset(ovcs, fdt, tree);
954 * leaked to drivers, so can not kfree() tree, aka ovcs->overlay_tree;
998 kfree(tree);
1036 * will create pointers to the passed in FDT in the unflattened tree.
1071 * Find @np in @tree.
1073 * Returns 1 if @np is @tree or is contained in @tree, else 0
1075 static int find_node(struct device_node *tree, struct device_node *np)
1079 if (tree == np)
1082 for_each_child_of_node(tree, child) {
1161 * tree can not be determined, and any following attempt to apply or remove