summaryrefslogtreecommitdiff
path: root/include/dm/of_access.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-10-06 17:23:47 -0400
committerTom Rini <trini@konsulko.com>2023-10-06 17:23:47 -0400
commit83aa0ed1e93e1ffac24888d98d37a5b04ed3fb07 (patch)
treefcabaf4a86164f385ede03b654bc69cbffb2a3ee /include/dm/of_access.h
parentbe2abe73df58a35da9e8d5afb13fccdf1b0faa8e (diff)
parentf69d3d6d10b15872a279aeb10b7c522627aff6c2 (diff)
Merge branch '2023-10-06-spl-prepare-for-universal-payload'
To quote the author: This series tidies up SPL a little and adds some core ofnode functions needed to support Universal Payload. It also includes a few minor fix-ups for sandbox. For SPL the changes include CONFIG naming, removing various #ifdefs and tidying up the FIT code. One notable piece of the ofnode improvements is support for flattening a livetree. This should be useful in future as we move FDT fixups to use the ofnode API.
Diffstat (limited to 'include/dm/of_access.h')
-rw-r--r--include/dm/of_access.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/dm/of_access.h b/include/dm/of_access.h
index 9361d0a87bf..de740d44674 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -597,4 +597,22 @@ int of_write_prop(struct device_node *np, const char *propname, int len,
int of_add_subnode(struct device_node *node, const char *name, int len,
struct device_node **subnodep);
+/**
+ * of_remove_property() - Remove a property from a node
+ *
+ * @np: Node to remove from
+ * @prop: Pointer to property to remove
+ * Return 0 if OK, -ENODEV if the property could not be found in the node
+ */
+int of_remove_property(struct device_node *np, struct property *prop);
+
+/**
+ * of_remove_node() - Remove a node from the tree
+ *
+ * @to_remove: Node to remove
+ * Return: 0 if OK, -EPERM if it is the root node (wWhich cannot be removed),
+ * -ENOENT if the tree is broken (to_remove is not a child of its parent)
+ */
+int of_remove_node(struct device_node *to_remove);
+
#endif