1 From f55b35f2dbd1ab60fe8d59c56ae1cbad2f3e67ab Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 15 Feb 2021 10:25:35 +0000
4 Subject: [PATCH] gpio-fsm: Rename 'num-soft-gpios' to avoid warning
6 As of 5.10, the Device Tree parser warns about properties that look
7 like references to "suppliers" of various services. "num-soft-gpios"
8 resembles a declaration of a GPIO called "num-soft", causing the value
9 to be interpreted as a phandle, the owner of which is checked for a
10 "#gpio-cells" property.
12 To avoid this warning, rename the gpio-fsm property to "num-swgpios".
14 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
16 drivers/gpio/gpio-fsm.c | 5 +++--
17 1 file changed, 3 insertions(+), 2 deletions(-)
19 --- a/drivers/gpio/gpio-fsm.c
20 +++ b/drivers/gpio/gpio-fsm.c
21 @@ -866,8 +866,9 @@ static int gpio_fsm_probe(struct platfor
22 [SYM_SHUTDOWN] = "shutdown_state",
25 - if (of_property_read_u32(np, "num-soft-gpios", &num_soft_gpios)) {
26 - dev_err(dev, "missing 'num-soft-gpios' property\n");
27 + if (of_property_read_u32(np, "num-swgpios", &num_soft_gpios) &&
28 + of_property_read_u32(np, "num-soft-gpios", &num_soft_gpios)) {
29 + dev_err(dev, "missing 'num-swgpios' property\n");