summaryrefslogtreecommitdiffstats
path: root/include/dm
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-09-10 18:26:17 +0200
committerSimon Glass <sjg@chromium.org>2020-09-22 12:54:13 -0600
commit01d89e3d12e07a1a1ee0f8528706441a84eee328 (patch)
treef690e7daeb0eae0db58b96a8261cb0cec1b4fe3b /include/dm
parent3e15c315f97401f394ae83ed17fbef72b765222a (diff)
downloadu-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.tar.gz
u-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.tar.xz
u-boot-01d89e3d12e07a1a1ee0f8528706441a84eee328.zip
dm: add cells_count parameter in live DT APIs of_parse_phandle_with_args
In the live tree API ofnode_parse_phandle_with_args, the cell_count argument must be used when cells_name is NULL. But this argument is not provided to the live DT function of_parse_phandle_with_args even it is provided to fdtdec_parse_phandle_with_args. This patch adds support of the cells_count parameter in dev_ and of_node API to allow migration and support of live DT: - of_parse_phandle_with_args Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/of_access.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dm/of_access.h b/include/dm/of_access.h
index f95a00d065..2fa65c9332 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -407,6 +407,7 @@ struct device_node *of_parse_phandle(const struct device_node *np,
* @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
+ * @cells_count: Cell count to use if @cells_name is NULL
* @index: index of a phandle to parse out
* @out_args: optional pointer to output arguments structure (will be filled)
* @return 0 on success (with @out_args filled out if not NULL), -ENOENT if
@@ -440,7 +441,8 @@ struct device_node *of_parse_phandle(const struct device_node *np,
*/
int of_parse_phandle_with_args(const struct device_node *np,
const char *list_name, const char *cells_name,
- int index, struct of_phandle_args *out_args);
+ int cells_count, int index,
+ struct of_phandle_args *out_args);
/**
* of_count_phandle_with_args() - Count the number of phandle in a list