diff options
author | Patrick Delaunay | 2020-09-25 09:41:14 +0200 |
---|---|---|
committer | Simon Glass | 2020-10-06 09:07:54 -0600 |
commit | 89f68302cacaa41330959420d7329b7c89afdd88 (patch) | |
tree | 30d80261c2bc56c4a00a9cb49910ce0670ce7ad0 /board/st | |
parent | 6d9949fe866751c527c5dafab5350af89b7b8332 (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 <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/st')
-rw-r--r-- | board/st/stm32mp1/stm32mp1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 3b677d339b7..03a19af9302 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -314,7 +314,7 @@ static int board_check_usb_power(void) * for each of them */ adc_count = ofnode_count_phandle_with_args(node, "st,adc_usb_pd", - "#io-channel-cells"); + "#io-channel-cells", 0); if (adc_count < 0) { if (adc_count == -ENOENT) return 0; |