[PATCH v2 40/45] dm: core: Update comments for default-FDT ofnode functions

Simon Glass sjg at chromium.org
Wed Sep 7 04:27:28 CEST 2022


Some ofnode functions can only operate on the default device tree, i.e.
U-Boot's control FDT. Add comments to that effect. Fix up the reference to
device tree bindings while we are here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 include/dm/ofnode.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 8e383c26d44..113dd15afe3 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -868,6 +868,8 @@ const void *ofnode_read_chosen_prop(const char *propname, int *sizep);
  * This looks for a property within the /chosen node and returns its value,
  * checking that it is a valid nul-terminated string
  *
+ * This only works with the control FDT.
+ *
  * @propname: Property name to look for
  * Return: string value if found, else NULL
  */
@@ -879,6 +881,8 @@ const char *ofnode_read_chosen_string(const char *propname);
  * This looks up a named property in the chosen node and uses that as a path to
  * look up a code.
  *
+ * This only works with the control FDT.
+ *
  * @propname: Property name to look for
  * Return: the referenced node if present, else ofnode_null()
  */
@@ -889,6 +893,8 @@ ofnode ofnode_get_chosen_node(const char *propname);
  *
  * This looks for a property within the /aliases node and returns its value
  *
+ * This only works with the control FDT.
+ *
  * @propname: Property name to look for
  * @sizep: Returns size of property, or `FDT_ERR_...` error code if function
  *	returns NULL
@@ -902,6 +908,8 @@ const void *ofnode_read_aliases_prop(const char *propname, int *sizep);
  * This looks up a named property in the aliases node and uses that as a path to
  * look up a code.
  *
+ * This only works with the control FDT.
+ *
  * @propname: Property name to look for
  * Return: the referenced node if present, else ofnode_null()
  */
@@ -1387,7 +1395,9 @@ phy_interface_t ofnode_read_phy_mode(ofnode mac_node);
  *
  * This reads a property from the /config node of the devicetree.
  *
- * See doc/config.txt for bindings
+ * This only works with the control FDT.
+ *
+ * See doc/device-tree-bindings/config.txt for bindings
  *
  * @prop_name:	property name to look up
  * Return: true, if it exists, false if not
@@ -1399,7 +1409,7 @@ bool ofnode_conf_read_bool(const char *prop_name);
  *
  * This reads a property from the /config node of the devicetree.
  *
- * See doc/config.txt for bindings
+ * See doc/device-tree-bindings/config.txt for bindings
  *
  * @prop_name: property name to look up
  * @default_val: default value to return if the property is not found
@@ -1412,7 +1422,9 @@ int ofnode_conf_read_int(const char *prop_name, int default_val);
  *
  * This reads a property from the /config node of the devicetree.
  *
- * See doc/config.txt for bindings
+ * This only works with the control FDT.
+ *
+ * See doc/device-tree-bindings/config.txt for bindings
  *
  * @prop_name: property name to look up
  * Return: string value, if found, or NULL if not
-- 
2.37.2.789.g6183377224-goog



More information about the U-Boot mailing list