aboutsummaryrefslogtreecommitdiff
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorSimon Glass2020-01-27 08:49:46 -0700
committerSimon Glass2020-02-05 19:33:45 -0700
commitbd933bfd834364bca6cc6f3a62e4255090a5bec1 (patch)
treeaade4618c7168efe95a72e4466350513ce1549fd /include/dm/ofnode.h
parent1aada6313ca9b9e9123a4118c78558ef413e1039 (diff)
dm: core: Add ofnode_get_chosen_prop()
Add a function to read a property from the chosen node, providing access to its length. Update ofnode_get_chosen_string() to make use of it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 80074836809..b5a50e88499 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -521,6 +521,18 @@ int ofnode_count_phandle_with_args(ofnode node, const char *list_name,
ofnode ofnode_path(const char *path);
/**
+ * ofnode_read_chosen_prop() - get the value of a chosen property
+ *
+ * This looks for a property within the /chosen node and returns its value
+ *
+ * @propname: Property name to look for
+ * @sizep: Returns size of property, or FDT_ERR_... error code if function
+ * returns NULL
+ * @return property value if found, else NULL
+ */
+const void *ofnode_read_chosen_prop(const char *propname, int *sizep);
+
+/**
* ofnode_read_chosen_string() - get the string value of a chosen property
*
* This looks for a property within the /chosen node and returns its value,