dm: add cells_count parameter in *_count_phandle_with_args
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 25 Sep 2020 07:41:14 +0000 (09:41 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 6 Oct 2020 15:07:54 +0000 (09:07 -0600)
commit89f68302cacaa41330959420d7329b7c89afdd88
tree30d80261c2bc56c4a00a9cb49910ce0670ce7ad0
parent6d9949fe866751c527c5dafab5350af89b7b8332
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>
15 files changed:
board/st/stm32mp1/stm32mp1.c
drivers/clk/clk-uclass.c
drivers/core/of_access.c
drivers/core/ofnode.c
drivers/core/read.c
drivers/net/designware.c
drivers/phy/phy-uclass.c
drivers/power/domain/power-domain-uclass.c
drivers/reset/reset-uclass.c
drivers/usb/host/ehci-generic.c
drivers/usb/host/ohci-da8xx.c
drivers/usb/host/ohci-generic.c
include/dm/of_access.h
include/dm/ofnode.h
include/dm/read.h