aboutsummaryrefslogtreecommitdiff
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-07-28 12:51:08 +0200
committerMichal Simek <michal.simek@xilinx.com>2020-10-27 08:13:32 +0100
commit305d31885f2f35db486594d051d9aa3a4ed201c5 (patch)
treef457efe965ffae9667f967a0c27b4cf39ad95725 /include/dm/ofnode.h
parentc94b44c64bd8661bee0eb4b39a2aac176c466147 (diff)
downloadu-boot-305d31885f2f35db486594d051d9aa3a4ed201c5.zip
u-boot-305d31885f2f35db486594d051d9aa3a4ed201c5.tar.gz
u-boot-305d31885f2f35db486594d051d9aa3a4ed201c5.tar.bz2
dm: core: Add support for getting node from aliases
Add support for getting a node/property from aliases. The similar functionality is provided for chosen node and this implemenatation is copy of it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 4b7af37..ced7f6f 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -605,6 +605,28 @@ const char *ofnode_read_chosen_string(const char *propname);
*/
ofnode ofnode_get_chosen_node(const char *propname);
+/**
+ * ofnode_read_aliases_prop() - get the value of a aliases property
+ *
+ * This looks for a property within the /aliases 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_aliases_prop(const char *propname, int *sizep);
+
+/**
+ * ofnode_get_aliases_node() - get a referenced node from the aliases node
+ *
+ * This looks up a named property in the aliases node and uses that as a path to
+ * look up a code.
+ *
+ * @return the referenced node if present, else ofnode_null()
+ */
+ofnode ofnode_get_aliases_node(const char *propname);
+
struct display_timing;
/**
* ofnode_decode_display_timing() - decode display timings