]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Rename 'num-gpios' property to avoid dtc warning
authorSimon Glass <sjg@chromium.org>
Sat, 3 Feb 2018 17:36:59 +0000 (10:36 -0700)
committerSimon Glass <sjg@chromium.org>
Sun, 18 Feb 2018 22:53:32 +0000 (15:53 -0700)
At present dtc produces these warnings when compiling sandbox:

arch/sandbox/dts/test.dtb: Warning (gpios_property):
Could not get phandle node for /base-gpios:num-gpios(cell 0)
arch/sandbox/dts/test.dtb: Warning (gpios_property):
Missing property '#gpio-cells' in node /reset-ctl or bad phandle
(referred from /extra-gpios:num-gpios[0])

Both are due to it assuming that the 'num-gpios' property holds a phandle
pointing to a GPIO node.

To avoid these warnings, rename the sandbox property so that it does not
include the string 'gpios'.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/sandbox.dts
arch/sandbox/dts/test.dts
drivers/gpio/sandbox.c

index 0aba6c9a6da6f17f6ecb912edb07a0eaf69d0d27..1fb8225fbb23775d20572a60bcc7241ca8f655ba 100644 (file)
@@ -70,7 +70,7 @@
                compatible = "sandbox,gpio";
                #gpio-cells = <1>;
                gpio-bank-name = "a";
-               num-gpios = <20>;
+               sandbox,gpio-count = <20>;
        };
 
        gpio_b: gpios@1 {
@@ -78,7 +78,7 @@
                compatible = "sandbox,gpio";
                #gpio-cells = <2>;
                gpio-bank-name = "b";
-               num-gpios = <10>;
+               sandbox,gpio-count = <10>;
        };
 
        hexagon {
index c38e3691628f586c965b157ad2d5a80af0a7f627..b0f0ca8f19ce9104c58737ff8840aca58f26dfb3 100644 (file)
                gpio-controller;
                #gpio-cells = <1>;
                gpio-bank-name = "a";
-               num-gpios = <20>;
+               sandbox,gpio-count = <20>;
        };
 
        gpio_b: extra-gpios {
                gpio-controller;
                #gpio-cells = <5>;
                gpio-bank-name = "b";
-               num-gpios = <10>;
+               sandbox,gpio-count = <10>;
        };
 
        i2c@0 {
index 4f7b62eba0ddc420acd0ea2e8903e6a58968ff37..2a18f328576a6e6cc521eefa45b756581268d149 100644 (file)
@@ -198,7 +198,8 @@ static int sandbox_gpio_ofdata_to_platdata(struct udevice *dev)
 {
        struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
 
-       uc_priv->gpio_count = dev_read_u32_default(dev, "num-gpios", 0);
+       uc_priv->gpio_count = dev_read_u32_default(dev, "sandbox,gpio-count",
+                                                  0);
        uc_priv->bank_name = dev_read_string(dev, "gpio-bank-name");
 
        return 0;