1 From ff24fed10ba414d19579e26e60b126fad2f2bb07 Mon Sep 17 00:00:00 2001
2 From: Michael Walle <michael@walle.cc>
3 Date: Mon, 6 Feb 2023 13:43:44 +0000
4 Subject: [PATCH] of: property: make #.*-cells optional for simple props
6 Sometimes, future bindings for phandles will get additional arguments.
7 Thus the target node of the phandle will need a new #.*-cells property.
8 To be backwards compatible, this needs to be optional.
10 Prepare the DEFINE_SIMPLE_PROPS() to handle the cells name as optional.
12 Signed-off-by: Michael Walle <michael@walle.cc>
13 Tested-by: Miquel Raynal <miquel.raynal@bootlin.com>
14 Reviewed-by: Rob Herring <robh@kernel.org>
15 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
16 Link: https://lore.kernel.org/r/20230206134356.839737-11-srinivas.kandagatla@linaro.org
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 drivers/of/property.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
22 --- a/drivers/of/property.c
23 +++ b/drivers/of/property.c
24 @@ -1146,8 +1146,8 @@ static struct device_node *parse_prop_ce
25 if (strcmp(prop_name, list_name))
28 - if (of_parse_phandle_with_args(np, list_name, cells_name, index,
30 + if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, index,