summaryrefslogtreecommitdiff
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorPatrick Delaunay <[email protected]>2020-09-25 09:41:14 +0200
committerSimon Glass <[email protected]>2020-10-06 09:07:54 -0600
commit89f68302cacaa41330959420d7329b7c89afdd88 (patch)
tree30d80261c2bc56c4a00a9cb49910ce0670ce7ad0 /include/dm/ofnode.h
parent6d9949fe866751c527c5dafab5350af89b7b8332 (diff)
dm: add cells_count parameter in *_count_phandle_with_args
The cell_count argument is required when cells_name is NULL. This patch adds this parameter in live tree API - of_count_phandle_with_args - ofnode_count_phandle_with_args - dev_count_phandle_with_args This parameter solves issue when these API is used to count the number of element of a cell without cell name. This parameter allow to force the size cell. For example: count = dev_count_phandle_with_args(dev, "array", NULL, 3); Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 98c64fece30..4b7af370560 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -556,12 +556,13 @@ int ofnode_parse_phandle_with_args(ofnode node, const char *list_name,
* @node: device tree node containing a list
* @list_name: property name that contains a list
* @cells_name: property name that specifies phandles' arguments count
+ * @cells_count: Cell count to use if @cells_name is NULL
* @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);
+ const char *cells_name, int cell_count);
/**
* ofnode_path() - find a node by full path