ramips: use ralink,nr-gpio instead of ralink,num-gpios
authorMathias Kresin <dev@kresin.me>
Sat, 21 Jul 2018 17:32:51 +0000 (19:32 +0200)
committerMathias Kresin <dev@kresin.me>
Sat, 4 Aug 2018 06:39:35 +0000 (08:39 +0200)
Since commit c1e7738988f5 ("checks: add gpio binding properties check")
dtc treats any *-gpios and *-gpio property as phandle at least during
checks. The only whitelisted property is nr-gpio.

Use ralink,nr-gpio in favour of ralink,num-gpios to get rid of false
positive warnings.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/dts/mt7620a.dtsi
target/linux/ramips/dts/mt7620n.dtsi
target/linux/ramips/dts/rt2880.dtsi
target/linux/ramips/dts/rt3050.dtsi
target/linux/ramips/dts/rt3352.dtsi
target/linux/ramips/dts/rt3883.dtsi
target/linux/ramips/dts/rt5350.dtsi
target/linux/ramips/patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch
target/linux/ramips/patches-4.14/0026-DT-Add-documentation-for-gpio-ralink.patch
target/linux/ramips/patches-4.14/0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch

index 262932f959acbb9f3eee99ad9c8ca217fd5e08a2..39e5227d12d67cfabc9fb2309976184d13afe032 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <32>;
+                       ralink,nr-gpio = <32>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <72>;
-                       ralink,num-gpios = <1>;
+                       ralink,nr-gpio = <1>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index ff9f31e79c72bc330258caf70197544c9bd8c606..874d8c42c9f50032faef98897a513a2c5630becb 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <32>;
+                       ralink,nr-gpio = <32>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <72>;
-                       ralink,num-gpios = <1>;
+                       ralink,nr-gpio = <1>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index 184526ff969c9f9e33ea502111b034e092114e00..0d7a97fafb86f3e6593b6e2d6d3782010032f83d 100644 (file)
@@ -80,7 +80,7 @@
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
@@ -94,7 +94,7 @@
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <32>;
+                       ralink,nr-gpio = <32>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index c13d9ef805c6289d2e84138beafb7bf30df8f2bd..75f1229c926c950dd5876e53a1eb9566cb423cdf 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <12>;
+                       ralink,nr-gpio = <12>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index db0eda9fe8e6bd4c8f863f27219dc9aa40b18484..a609afd73d739b6e4b8bab2ed48e43d80064d115 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <6>;
+                       ralink,nr-gpio = <6>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index a7143388e33bc67ae11bb0591ee634f2bb11813d..b2ce93b8cf29b87b2427e7d73f25131c0ecb4082 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <24>;
-                       ralink,num-gpios = <16>;
+                       ralink,nr-gpio = <16>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <40>;
-                       ralink,num-gpios = <32>;
+                       ralink,nr-gpio = <32>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <72>;
-                       ralink,num-gpios = <24>;
+                       ralink,nr-gpio = <24>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index d2be76f3195a8841cdcf337268f2762165797392..f14162a5885574431137b14757ad9bbc8121eae9 100644 (file)
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <0>;
-                       ralink,num-gpios = <22>;
+                       ralink,nr-gpio = <22>;
                        ralink,register-map = [ 00 04 08 0c
                                                20 24 28 2c
                                                30 34 ];
                        #gpio-cells = <2>;
 
                        ralink,gpio-base = <22>;
-                       ralink,num-gpios = <6>;
+                       ralink,nr-gpio = <6>;
                        ralink,register-map = [ 00 04 08 0c
                                                10 14 18 1c
                                                20 24 ];
index 3e5dac5376524b2df16d64881e515001dab4c010..e9a03d93dddd39d60aaf87339adfdb5236b575b4 100644 (file)
@@ -482,7 +482,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +              if (!of_device_is_available(np))
 +                      continue;
 +
-+              ngpio = of_get_property(np, "ralink,num-gpios", NULL);
++              ngpio = of_get_property(np, "ralink,nr-gpio", NULL);
 +              gpiobase = of_get_property(np, "ralink,gpio-base", NULL);
 +              if (!ngpio || !gpiobase) {
 +                      dev_err(&pdev->dev, "failed to load chip info\n");
index 7d5f98f64722d07f8b9d5927881d0e972617ae29..0bce0b433a92a214cceeb05ac99ea51d919300e6 100644 (file)
@@ -29,7 +29,7 @@ Cc: linux-gpio@vger.kernel.org
 +- reg : Physical base address and length of the controller's registers
 +- interrupt-parent: phandle to the INTC device node
 +- interrupts : Specify the INTC interrupt number
-+- ralink,num-gpios : Specify the number of GPIOs
++- ralink,nr-gpio : Specify the number of GPIOs
 +- ralink,register-map : The register layout depends on the GPIO bank and actual
 +              SoC type. Register offsets need to be in this order.
 +              [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
@@ -51,7 +51,7 @@ Cc: linux-gpio@vger.kernel.org
 +              interrupts = <6>;
 +
 +              ralink,gpio-base = <0>;
-+              ralink,num-gpios = <24>;
++              ralink,nr-gpio = <24>;
 +              ralink,register-map = [ 00 04 08 0c
 +                              20 24 28 2c
 +                              30 34 ];
index 35cedf61fdf04eebd79011f9d0fd90621a2fdb2e..eaae0d3d02f70a9cac69c50d13e4a8dba2b7a956 100644 (file)
@@ -371,7 +371,7 @@ Cc: linux-gpio@vger.kernel.org
 +              return -EINVAL;
 +      }
 +
-+      ngpio = of_get_property(np, "ralink,num-gpios", NULL);
++      ngpio = of_get_property(np, "ralink,nr-gpio", NULL);
 +      if (!ngpio) {
 +              dev_err(&pdev->dev, "failed to read number of pins\n");
 +              return -EINVAL;