Lines Matching refs:overlay
9 #define pr_fmt(fmt) "OF: overlay: " fmt
27 * struct target - info about current target node as recursing through overlay
28 * @np: node where current level of overlay will be applied
32 * an overlay fragment, which is a devicetree subtree. Initially @np is a node
33 * in the live devicetree where the overlay subtree is targeted to be grafted
34 * into. When recursing to the next level of the overlay subtree, the target
35 * also recurses to the next level of the live devicetree, as long as overlay
36 * subtree node also exists in the live devicetree. When a node in the overlay
47 * struct fragment - info about fragment nodes in overlay expanded device tree
48 * @overlay: pointer to the __overlay__ node
49 * @target: target of the overlay operation
52 struct device_node *overlay;
63 * @notify_state: most recent notify action used on overlay
65 * @fragments: fragment nodes in the overlay expanded device tree
128 * of_overlay_notifier_register() - Register notifier for overlay operations
131 * Register for notification on overlay operations on device tree nodes. The
146 * of_overlay_notifier_unregister() - Unregister notifier for overlay operations
167 nd.overlay = fragment->overlay;
173 pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
227 if (fragment->overlay == overlay_node)
233 overlay_name_len = snprintf(NULL, 0, "%pOF", fragment->overlay);
275 * add_changeset_property() - add @overlay_prop to overlay changeset
276 * @ovcs: overlay changeset
278 * @overlay_prop: property to add or update, from overlay tree
293 * in the overlay must match the values in the live tree.
298 * invalid @overlay.
361 pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
373 * add_changeset_node() - add @node (and children) to overlay changeset
374 * @ovcs: overlay changeset
376 * @node: node from within overlay device tree fragment
382 * a phandle, the overlay node is not allowed to have a phandle.
388 * not contain the full path in node->full_name. Thus an overlay
394 * the full path in node->full_name. Even though it expects the overlay
397 * to nodes in the live devicetree so that it can apply an overlay to
403 * invalid @overlay.
463 * build_changeset_next_level() - add level of overlay changeset
464 * @ovcs: overlay changeset
466 * @overlay_node: node from within an overlay device tree fragment
621 * build_changeset() - populate overlay changeset in @ovcs from @ovcs->fragments
625 * overlay device tree fragments in @ovcs->fragments[]. If an error occurs,
630 * invalid overlay in @ovcs->fragments[].
653 fragment->overlay);
667 fragment->overlay);
731 * init_overlay_changeset() - initialize overlay changeset from overlay tree
733 * @target_base: Point to the target node to apply overlay
803 fragment->overlay = overlay_node;
806 of_node_put(fragment->overlay);
823 fragment->overlay = node;
827 pr_err("symbols in overlay, but not in live tree\n");
837 pr_err("no fragments or symbols in overlay\n");
868 of_node_put(ovcs->fragments[i].overlay);
874 * ovcs->new_fdt due to the policy that overlay notifiers are not
875 * allowed to retain pointers into the overlay devicetree other
876 * than during the window from OF_OVERLAY_PRE_APPLY overlay
877 * notifiers until the OF_OVERLAY_POST_REMOVE overlay notifiers.
893 * of_overlay_apply() - Create and apply an overlay changeset
894 * @ovcs: overlay changeset
895 * @base: point to the target node to apply overlay
897 * Creates and applies an overlay changeset.
899 * If an error is returned by an overlay changeset pre-apply notifier
900 * then no further overlay changeset pre-apply notifier will be called.
902 * If an error is returned by an overlay changeset post-apply notifier
903 * then no further overlay changeset post-apply notifier will be called.
908 * If an error occurred while applying the overlay changeset, then an
912 * following attempt to apply or remove an overlay changeset will be
944 pr_debug("overlay changeset revert error %d\n",
953 pr_err("overlay apply changeset entry notify error %d\n", ret);
968 * of_overlay_fdt_apply() - Create and apply an overlay changeset
969 * @overlay_fdt: pointer to overlay FDT
972 * @base: pointer for the target node to apply overlay
974 * Creates and applies an overlay changeset.
979 * the value of overlay changeset id, which can be passed to of_overlay_remove()
980 * to remove the overlay.
1000 pr_err("devicetree state suspect, refuse to apply overlay\n");
1103 * node in an overlay changeset more topmost than @remove_ovcs?
1137 * We can safely remove the overlay only if it's the top-most one.
1138 * Newly applied overlays are inserted at the tail of the overlay list,
1139 * so a top most overlay is the one that is closest to the tail.
1142 * affected device node in the log list we check if this overlay is
1143 * the one closest to the tail. If another overlay has affected this
1152 pr_err("overlay #%d is not topmost\n", remove_ovcs->id);
1161 * of_overlay_remove() - Revert and free an overlay changeset
1162 * @ovcs_id: Pointer to overlay changeset id
1164 * Removes an overlay if it is permissible. @ovcs_id was previously returned
1167 * If an error occurred while attempting to revert the overlay changeset,
1171 * an overlay changeset will be refused.
1175 * - overlay changeset pre-remove notifier
1176 * - overlay changeset entry revert
1178 * If an error is returned by an overlay changeset pre-remove notifier
1179 * then no further overlay changeset pre-remove notifier will be called.
1185 * - overlay changeset entry notifier
1186 * - overlay changeset post-remove notifier
1188 * If an error is returned by an overlay changeset post-remove notifier
1189 * then no further overlay changeset post-remove notifier will be called.
1200 pr_err("suspect devicetree state, refuse to remove overlay\n");
1210 pr_err("remove: Could not find overlay #%d\n", *ovcs_id);
1233 pr_err("overlay remove changeset entry notify error %d\n", ret);
1239 * Note that the overlay memory will be kfree()ed by
1253 * overlay related memory. This is a memory leak unless a subsequent
1254 * of_overlay_remove() of this overlay is successful.
1266 * of_overlay_remove_all() - Reverts and frees all overlay changesets