]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ARM: sunxi: DT: convert DTs to use common GPIOs includes
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 16 Dec 2014 21:59:55 +0000 (22:59 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 21 Jan 2015 08:58:56 +0000 (09:58 +0100)
Replace the various raw GPIO flags by their definition in the common
dt-bindings header.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
30 files changed:
arch/arm/boot/dts/sun4i-a10-a1000.dts
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
arch/arm/boot/dts/sun4i-a10-cubieboard.dts
arch/arm/boot/dts/sun4i-a10-hackberry.dts
arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
arch/arm/boot/dts/sun4i-a10-pcduino.dts
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
arch/arm/boot/dts/sun5i-a13-olinuxino.dts
arch/arm/boot/dts/sun6i-a31-app4-evb1.dts
arch/arm/boot/dts/sun6i-a31-colombus.dts
arch/arm/boot/dts/sun6i-a31-hummingbird.dts
arch/arm/boot/dts/sun6i-a31-m9.dts
arch/arm/boot/dts/sun7i-a20-bananapi.dts
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
arch/arm/boot/dts/sun7i-a20-hummingbird.dts
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
arch/arm/boot/dts/sun7i-a20-m3.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/boot/dts/sun7i-a20-pcduino3.dts
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
arch/arm/boot/dts/sun9i-a80-optimus.dts
arch/arm/boot/dts/sunxi-common-regulators.dtsi

index 3bb636978582651f5c8db4515b546f51fcfafd2a..532ab3bd97353e51236389f600df59b43fd5b992 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Mele A1000";
        compatible = "mele,a1000", "allwinner,sun4i-a10";
@@ -77,7 +79,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                red {
                        label = "a1000:red:usr";
-                       gpios = <&pio 7 10 0>;
+                       gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
                };
 
                blue {
                        label = "a1000:blue:usr";
-                       gpios = <&pio 7 20 0>;
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
        };
 
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                enable-active-high;
-               gpio = <&pio 7 15 0>;
+               gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
        };
 
        reg_usb1_vbus: usb1-vbus {
index b2b45c4f7915ced4d355781c57c26a9816df253a..490b77c9bb36757ab5b61ea00d6cae4431fc2954 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "BA10 tvbox";
        compatible = "allwinner,ba10-tvbox", "allwinner,sun4i-a10";
@@ -74,7 +76,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
        };
 
        reg_usb2_vbus: usb2-vbus {
-               gpio = <&pio 7 12 0>;
+               gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index b9202716fbdb60337da5efc0fd74b62f5de74961..53f12b71e837765b5da5bcfcbfd55add7c632be8 100644 (file)
@@ -50,6 +50,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Cubietech Cubieboard";
        compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10";
@@ -75,7 +77,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                blue {
                        label = "cubieboard:blue:usr";
-                       gpios = <&pio 7 21 0>; /* LED1 */
+                       gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
                };
 
                green {
                        label = "cubieboard:green:usr";
-                       gpios = <&pio 7 20 0>; /* LED2 */
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
                        linux,default-trigger = "heartbeat";
                };
        };
index 0c6c81a6b61be5b0da4e94fcc9174e6d45102d6b..be1f29e50811b2ca444698e44f1324db28ffb34e 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Miniand Hackberry";
        compatible = "miniand,hackberry", "allwinner,sun4i-a10";
@@ -77,7 +79,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                enable-active-high;
-               gpio = <&pio 7 19 0>;
+               gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;
        };
 
        reg_usb1_vbus: usb1-vbus {
 
        reg_usb2_vbus: usb2-vbus {
                pinctrl-0 = <&usb2_vbus_pin_hackberry>;
-               gpio = <&pio 7 12 0>;
+               gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index 5980ad0e69e3d8904df52d279f6aee96b23d199a..482914333bba2759cb4b92235c25c1b6d89ac2e2 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "INet-97F Rev 02";
        compatible = "primux,inet97fv2", "allwinner,sun4i-a10";
@@ -65,7 +67,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
index e55639988e5dab2a96922b514cd3711a138c4967..1db02eb3796c67a891e0560aba398bcb99e3b41b 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "PineRiver Mini X-Plus";
        compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10";
@@ -61,7 +63,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
index 3f607946abada8afb9a6dd99ed8ae7c6b3020db1..5d9b86839f16fc253e7b1b1a2d93d1f5a0ccac3e 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Olimex A10-OLinuXino-LIME";
        compatible = "olimex,a10-olinuxino-lime", "allwinner,sun4i-a10";
@@ -74,7 +76,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "a10-olinuxino-lime:green:usr";
-                       gpios = <&pio 7 2 0>;
+                       gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_ahci_5v: ahci-5v {
                pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
-               gpio = <&pio 2 3 0>;
+               gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 
index 7367eff79deac2dba14e88019c6ad5a7809ef4fe..48161adfb32c1b433c6d16c3a29963d1013cc3fe 100644 (file)
@@ -50,6 +50,8 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "LinkSprite pcDuino";
        compatible = "linksprite,a10-pcduino", "allwinner,sun4i-a10";
@@ -75,7 +77,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
index dac9d493c20518e866fa0cc629bf6d725c41a68a..f80d2facc15814a1dfd5a3196b2ce73d5effd695 100644 (file)
@@ -50,6 +50,8 @@
 /dts-v1/;
 #include "sun5i-a10s.dtsi"
 #include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
@@ -77,7 +79,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 1 0>; /* PG1 */
+                       cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
                        cd-inverted;
                        status = "okay";
                };
@@ -87,7 +89,7 @@
                        pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 13 0>; /* PG13 */
+                       cd-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "a10s-olinuxino-micro:green:usr";
-                       gpios = <&pio 4 3 0>;
+                       gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>;
-               gpio = <&pio 1 10 0>;
+               gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index 3a0d9dc39914ae0cc3b1b23955f65b405fad587e..da2d2535b1bcb5df6d25b335d54a0508f019c980 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun5i-a10s.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "R7 A10s hdmi tv-stick";
        compatible = "allwinner,r7-tv-dongle", "allwinner,sun5i-a10s";
@@ -59,7 +61,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 1 0>; /* PG1 */
+                       cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "r7-tv-dongle:green:usr";
-                       gpios = <&pio 1 2 0>;
+                       gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_r7>;
-               gpio = <&pio 6 13 0>;
+               gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index ca6b6dd30e4741f1df53158612ce3dff6b1c2539..bccc1bcaa8688235b0e01787abd78ef7ef8cc73f 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun5i-a13.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "HSG H702";
        compatible = "hsg,h702", "allwinner,sun5i-a13";
@@ -59,7 +61,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 0 0>; /* PG0 */
+                       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
                        cd-inverted;
                        status = "okay";
                };
index 729f02daf605f51f829e065efdc78b0fb3dc3c88..c30180794c5405ce6a7ec1614d86706c453571c4 100644 (file)
@@ -50,6 +50,8 @@
 #include "sun5i-a13.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Olimex A13-Olinuxino Micro";
        compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
@@ -60,7 +62,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 0 0>; /* PG0 */
+                       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
                        cd-inverted;
                        status = "okay";
                };
 
                power {
                        label = "a13-olinuxino-micro:green:power";
-                       gpios = <&pio 6 9 0>;
+                       gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
-               gpio = <&pio 6 11 0>;
+               gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index 529ff27dbb9fe5e331fbe76d71d28bcdd3c2bbb6..e28a0765429acb5a3b2573a4f2ae33d6b4c170eb 100644 (file)
@@ -50,6 +50,8 @@
 /dts-v1/;
 #include "sun5i-a13.dtsi"
 #include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
@@ -62,7 +64,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 0 0>; /* PG0 */
+                       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
                        cd-inverted;
                        status = "okay";
                };
                pinctrl-0 = <&led_pins_olinuxino>;
 
                power {
-                       gpios = <&pio 6 9 0>;
+                       gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
-               gpio = <&pio 6 11 0>;
+               gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index 42a11f4795f7826d1fa0a40003933ea0b7505166..0d86e8cb2ca2be931d44d4dcdf3a464c3583488f 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun6i-a31.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Allwinner A31 APP4 EVB1 Evaluation Board";
        compatible = "allwinner,app4-evb1", "allwinner,sun6i-a31";
@@ -87,7 +89,7 @@
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_a>;
-               gpio = <&pio 7 27 0>;
+               gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index 2e5bcaf6e8601f1a97e2d8e94360bb14cdf3fc93..deab8f357ad79c9f08c7d752a8fcd07c77951ba6 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun6i-a31.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "WITS A31 Colombus Evaluation Board";
        compatible = "wits,colombus", "allwinner,sun6i-a31";
@@ -65,7 +67,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>;
                        vmmc-supply = <&reg_vcc3v0>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 0 8 0>; /* PA8 */
+                       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
                        cd-inverted;
                        status = "okay";
                };
        reg_usb2_vbus: usb2-vbus {
                pinctrl-names = "default";
                pinctrl-0 = <&usb2_vbus_pin_colombus>;
-               gpio = <&pio 7 24 0>;
+               gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index a3bf20930d5083471d2d0b303425169f77c0a781..7364d22b33dd9ab9c8af5955e39dc777b640aac6 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun6i-a31.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Merrii A31 Hummingbird";
        compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
@@ -65,7 +67,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
                        vmmc-supply = <&reg_vcc3v0>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 0 8 0>; /* PA8 */
+                       cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
                        cd-inverted;
                        status = "okay";
                };
                        pinctrl-0 = <&gmac_pins_rgmii_a>;
                        phy = <&phy1>;
                        phy-mode = "rgmii";
-                       snps,reset-gpio = <&pio 0 21 0>;
+                       snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
                        snps,reset-active-low;
                        snps,reset-delays-us = <0 10000 30000>;
                        status = "okay";
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_a>;
-               gpio = <&pio 7 24 0>; /* PH24 */
+               gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
                status = "okay";
        };
 };
index 74d4a23a0bdc2a77894f3211dff461e37359a9b5..8018baa6814ddc1fbdb5aadcd7eb96b97dbfa60e 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun6i-a31.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Mele M9 / A1000G Quad top set box";
        compatible = "mele,m9", "allwinner,sun6i-a31";
@@ -63,7 +65,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 22 0>; /* PH22 */
+                       cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
                        cd-inverted;
                        status = "okay";
                };
 
                blue {
                        label = "m9:blue:usr";
-                       gpios = <&pio 7 13 0>;
+                       gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>;
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-names = "default";
                pinctrl-0 = <&usb1_vbus_pin_m9>;
-               gpio = <&pio 2 27 0>;
+               gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index e9e96584bedd60b9213946aeb164b8d853c895d0..e273f0e0627ac2255d1f8e68cb38b08f884ba055 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "LeMaker Banana Pi";
        compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
@@ -67,7 +69,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 10 0>; /* PH10 */
+                       cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "bananapi:green:usr";
-                       gpios = <&pio 7 24 0>;
+                       gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
                };
        };
 
                regulator-max-microvolt = <3300000>;
                startup-delay-us = <100000>;
                enable-active-high;
-               gpio = <&pio 7 23 0>;
+               gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
        };
 };
index 809d448ecf301717e25d6c3837b3bb4941712cfb..27ca1a16ca91fb43bccb60d6bd3e18a6f454da82 100644 (file)
@@ -15,6 +15,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Cubietech Cubieboard2";
        compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
@@ -25,7 +27,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                blue {
                        label = "cubieboard2:blue:usr";
-                       gpios = <&pio 7 21 0>;
+                       gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
                };
 
                green {
                        label = "cubieboard2:green:usr";
-                       gpios = <&pio 7 20 0>;
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
        };
 
index 9812a3a3483104772bfabfd7cc57effc60c8c63e..a6e88f8ce5330ebfbb3e94fdd01eefa687287e44 100644 (file)
@@ -15,6 +15,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Cubietech Cubietruck";
        compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
@@ -25,7 +27,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                blue {
                        label = "cubietruck:blue:usr";
-                       gpios = <&pio 7 21 0>;
+                       gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
                };
 
                orange {
                        label = "cubietruck:orange:usr";
-                       gpios = <&pio 7 20 0>;
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
 
                white {
                        label = "cubietruck:white:usr";
-                       gpios = <&pio 7 11 0>;
+                       gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
                };
 
                green {
                        label = "cubietruck:green:usr";
-                       gpios = <&pio 7 7 0>;
+                       gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
                };
        };
 
        reg_ahci_5v: ahci-5v {
                pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
-               gpio = <&pio 7 12 0>;
+               gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 
        reg_usb0_vbus: usb0-vbus {
                pinctrl-0 = <&usb0_vbus_pin_a>;
-               gpio = <&pio 7 17 0>;
+               gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                enable-active-high;
-               gpio = <&pio 7 9 0>;
+               gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
        };
 };
index add6d95a024653f2628c91c5bcad98548f74f456..3b8bd22296e6bd1dd8f6286001ad3a8244d5dd20 100644 (file)
@@ -15,6 +15,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Merrii A20 Hummingbird";
        compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
@@ -25,7 +27,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v0>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
                        phy-mode = "rgmii";
                        phy-supply = <&reg_gmac_vdd>;
                        /* phy reset config */
-                       snps,reset-gpio = <&pio 0 17 0>; /* PA17 */
+                       snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
                        snps,reset-active-low;
                        /* wait 1s after reset, otherwise fail to read phy id */
                        snps,reset-delays-us = <0 10000 1000000>;
 
        reg_ahci_5v: ahci-5v {
                pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
-               gpio = <&pio 7 15 0>; /* PH15 */
+               gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
                status = "okay";
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
-               gpio = <&pio 7 2 0>; /* PH2 */
+               gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
                status = "okay";
        };
 
                regulator-min-microvolt = <3000000>;
                regulator-max-microvolt = <3000000>;
                enable-active-high;
-               gpio = <&pio 7 9 0>; /* PH9 */
+               gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
        };
 
        reg_gmac_vdd: gmac_vdd {
                regulator-min-microvolt = <3000000>;
                regulator-max-microvolt = <3000000>;
                enable-active-high;
-               gpio = <&pio 7 16 0>; /* PH16 */
+               gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
        };
 };
index 780f1aa98429f3cfa59a1784e24eeb4401d73d01..a422f19a0261ed9f592c063aa543ea5dc0e8904a 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "I12 / Q5 / QT840A A20 tvbox";
        compatible = "allwinner,i12-tvbox", "allwinner,sun7i-a20";
@@ -59,7 +61,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                red {
                        label = "i12_tvbox:red:usr";
-                       gpios = <&pio 7 9 1>;
+                       gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;
                };
 
                blue {
                        label = "i12_tvbox:blue:usr";
-                       gpios = <&pio 7 20 0>;
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
        };
 
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                enable-active-high;
-               gpio = <&pio 7 2 0>;
+               gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
        };
 
        reg_vmmc3_io: vmmc3-io {
                /* This controls VCC-PI, must be always on! */
                regulator-always-on;
                enable-active-high;
-               gpio = <&pio 7 12 0>;
+               gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
        };
 
        reg_gmac_3v3: gmac-3v3 {
                regulator-max-microvolt = <3300000>;
                startup-delay-us = <50000>;
                enable-active-high;
-               gpio = <&pio 7 21 0>;
+               gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>;
        };
 };
index 82046234d9e846cfd1706dd4ea68c86cc8927a9b..3e40ae74f5e294b9635f703382a8a7bca346c416 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Mele M3";
        compatible = "mele,m3", "allwinner,sun7i-a20";
@@ -61,7 +63,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                blue {
                        label = "m3:blue:usr";
-                       gpios = <&pio 7 20 0>;
+                       gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
                };
        };
 
index 996da8be0e448547c2a90423ce7add960389b888..0423b1cbb3651fecf86df42a928fd8961ae2ab55 100644 (file)
@@ -52,6 +52,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Olimex A20-OLinuXino-LIME";
        compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20";
@@ -62,7 +64,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "a20-olinuxino-lime:green:usr";
-                       gpios = <&pio 7 2 0>;
+                       gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_ahci_5v: ahci-5v {
                pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
-               gpio = <&pio 2 3 0>;
+               gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 
index 5fda1e02acdb2f34d9cfb9f9cdb9b8c09486ada3..ce1e28afa2fe2c32123181f191d72b44caf6a5da 100644 (file)
@@ -49,6 +49,8 @@
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Olimex A20-OLinuXino-LIME2";
        compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20";
@@ -59,7 +61,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "a20-olinuxino-lime2:green:usr";
-                       gpios = <&pio 7 2 0>;
+                       gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_ahci_5v: ahci-5v {
                pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
-               gpio = <&pio 2 3 0>;
+               gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 
index c00badd96cf9430749b546873c8c0c535f974d77..ae3dd395321259034beb595b412314ce8a03f391 100644 (file)
@@ -14,6 +14,8 @@
 /dts-v1/;
 #include "sun7i-a20.dtsi"
 #include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
@@ -37,7 +39,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
@@ -47,7 +49,7 @@
                        pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 11 0>; /* PH11 */
+                       cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
                        cd-inverted;
                        status = "okay";
                };
 
                green {
                        label = "a20-olinuxino-micro:green:usr";
-                       gpios = <&pio 7 2 0>;
+                       gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
index eb7b8878303d04250c25ff3677c431e9d00abbdf..acce93300abf122d3b6f2069b61b81f458d8a2cc 100644 (file)
@@ -63,7 +63,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
                        cd-inverted;
                        status = "okay";
                };
        };
 
        reg_ahci_5v: ahci-5v {
-               gpio = <&pio 7 2 0>;
+               gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };
index adc3a54b6612ebeca3d9aebd2d838a36c8de60bb..72ece67258f4a776404dc149c4867e07ab30380a 100644 (file)
@@ -51,6 +51,8 @@
 #include "sun8i-a23.dtsi"
 #include "sunxi-common-regulators.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Ippo Q8H Dual Core Tablet (v5)";
        compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
@@ -69,7 +71,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>;
                        vmmc-supply = <&reg_vcc3v0>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 1 4 0>; /* PB4 */
+                       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
                        cd-inverted;
                        status = "okay";
                };
index 7fe242a8134bcef106eb8f07f9e01e671952df8b..8868c946e034ac9b24ffb4e321139e5ed36c1e74 100644 (file)
@@ -50,6 +50,8 @@
 /dts-v1/;
 #include "sun9i-a80.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Merrii A80 Optimus Board";
        compatible = "merrii,a80-optimus", "allwinner,sun9i-a80";
 
                led2 {
                        label = "optimus:led2:usr";
-                       gpios = <&pio 7 1 0>;
+                       gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
                };
 
                /* led3 is on PM15, in R_PIO */
 
                led4 {
                        label = "optimus:led4:usr";
-                       gpios = <&pio 7 0 0>;
+                       gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>;
                };
        };
 };
index d8876634f965e47e99e6554d0fccca2c88f4afc4..d6b7983cf16acf1d161de730bc7970d3509e6978 100644 (file)
@@ -47,6 +47,8 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        soc@01c00000 {
                pio: pinctrl@01c20800 {
@@ -89,7 +91,7 @@
                regulator-max-microvolt = <5000000>;
                regulator-boot-on;
                enable-active-high;
-               gpio = <&pio 1 8 0>;
+               gpio = <&pio 1 8 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
 
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
-               gpio = <&pio 1 9 0>;
+               gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
 
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
-               gpio = <&pio 7 6 0>;
+               gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
 
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
-               gpio = <&pio 7 3 0>;
+               gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };