diff options
author | Tom Rini <trini@konsulko.com> | 2017-07-29 15:43:51 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-29 15:43:51 (GMT) |
commit | 211aaf309cde193918f9a19b0b010acebfd80a82 (patch) | |
tree | 2c4ee988b53b504a64ebe286ebb6a113603056de /include/dm/ofnode.h | |
parent | 32ca40bf8b95fa1312de52109b84f888e2ea3642 (diff) | |
parent | b108d8a0de3ddc6fe8aae55bc54e3edc69b4778b (diff) | |
download | u-boot-fsl-qoriq-211aaf309cde193918f9a19b0b010acebfd80a82.tar.xz |
Merge git://git.denx.de/u-boot-usb
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r-- | include/dm/ofnode.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 966ca93..210ddb2 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -435,6 +435,23 @@ int ofnode_parse_phandle_with_args(ofnode node, const char *list_name, struct ofnode_phandle_args *out_args); /** + * ofnode_count_phandle_with_args() - Count number of phandle in a list + * + * This function is useful to count phandles into a list. + * Returns number of phandle on success, on error returns appropriate + * errno value. + * + * @node: 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 on success, -ENOENT if @list_name does not + * exist, -EINVAL if a phandle was not found, @cells_name could not + * be found. + */ +int ofnode_count_phandle_with_args(ofnode node, const char *list_name, + const char *cells_name); + +/** * ofnode_path() - find a node by full path * * @path: Full path to node, e.g. "/bus/spi@1" |