summaryrefslogtreecommitdiff
path: root/include/dm/of_access.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-07-29 15:43:51 (GMT)
committerTom Rini <trini@konsulko.com>2017-07-29 15:43:51 (GMT)
commit211aaf309cde193918f9a19b0b010acebfd80a82 (patch)
tree2c4ee988b53b504a64ebe286ebb6a113603056de /include/dm/of_access.h
parent32ca40bf8b95fa1312de52109b84f888e2ea3642 (diff)
parentb108d8a0de3ddc6fe8aae55bc54e3edc69b4778b (diff)
downloadu-boot-fsl-qoriq-211aaf309cde193918f9a19b0b010acebfd80a82.tar.xz
Merge git://git.denx.de/u-boot-usb
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 c5ea391..c49d287 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -353,6 +353,24 @@ int of_parse_phandle_with_args(const struct device_node *np,
int index, struct of_phandle_args *out_args);
/**
+ * of_count_phandle_with_args() - Count the number of phandle in a list
+ *
+ * @np: pointer to a device tree node containing a list
+ * @list_name: property name that contains a list
+ * @cells_name: property name that specifies phandles' arguments count
+ * @return number of phandle found, -ENOENT if
+ * @list_name does not exist, -EINVAL if a phandle was not found,
+ * @cells_name could not be found, the arguments were truncated or there
+ * were too many arguments.
+ *
+ * Returns number of phandle found on success, on error returns appropriate
+ * errno value.
+ *
+ */
+int of_count_phandle_with_args(const struct device_node *np,
+ const char *list_name, const char *cells_name);
+
+/**
* of_alias_scan() - Scan all properties of the 'aliases' node
*
* The function scans all the properties of the 'aliases' node and populates