Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: sunxi: DT: convert DTs to use common GPIOs includes

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>

+145 -87
+6 -4
arch/arm/boot/dts/sun4i-a10-a1000.dts
··· 51 51 #include "sun4i-a10.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Mele A1000"; 56 58 compatible = "mele,a1000", "allwinner,sun4i-a10"; ··· 79 77 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 80 78 vmmc-supply = <&reg_vcc3v3>; 81 79 bus-width = <4>; 82 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 80 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 83 81 cd-inverted; 84 82 status = "okay"; 85 83 }; ··· 161 159 162 160 red { 163 161 label = "a1000:red:usr"; 164 - gpios = <&pio 7 10 0>; 162 + gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; 165 163 }; 166 164 167 165 blue { 168 166 label = "a1000:blue:usr"; 169 - gpios = <&pio 7 20 0>; 167 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 170 168 }; 171 169 }; 172 170 ··· 178 176 regulator-min-microvolt = <3300000>; 179 177 regulator-max-microvolt = <3300000>; 180 178 enable-active-high; 181 - gpio = <&pio 7 15 0>; 179 + gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; 182 180 }; 183 181 184 182 reg_usb1_vbus: usb1-vbus {
+4 -2
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
··· 49 49 #include "sun4i-a10.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "BA10 tvbox"; 54 56 compatible = "allwinner,ba10-tvbox", "allwinner,sun4i-a10"; ··· 76 74 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 77 75 vmmc-supply = <&reg_vcc3v3>; 78 76 bus-width = <4>; 79 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 77 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 80 78 cd-inverted; 81 79 status = "okay"; 82 80 }; ··· 142 140 }; 143 141 144 142 reg_usb2_vbus: usb2-vbus { 145 - gpio = <&pio 7 12 0>; 143 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 146 144 status = "okay"; 147 145 }; 148 146 };
+5 -3
arch/arm/boot/dts/sun4i-a10-cubieboard.dts
··· 50 50 #include "sun4i-a10.dtsi" 51 51 #include "sunxi-common-regulators.dtsi" 52 52 53 + #include <dt-bindings/gpio/gpio.h> 54 + 53 55 / { 54 56 model = "Cubietech Cubieboard"; 55 57 compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10"; ··· 77 75 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 78 76 vmmc-supply = <&reg_vcc3v3>; 79 77 bus-width = <4>; 80 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 78 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 81 79 cd-inverted; 82 80 status = "okay"; 83 81 }; ··· 165 163 166 164 blue { 167 165 label = "cubieboard:blue:usr"; 168 - gpios = <&pio 7 21 0>; /* LED1 */ 166 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */ 169 167 }; 170 168 171 169 green { 172 170 label = "cubieboard:green:usr"; 173 - gpios = <&pio 7 20 0>; /* LED2 */ 171 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */ 174 172 linux,default-trigger = "heartbeat"; 175 173 }; 176 174 };
+5 -3
arch/arm/boot/dts/sun4i-a10-hackberry.dts
··· 51 51 #include "sun4i-a10.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Miniand Hackberry"; 56 58 compatible = "miniand,hackberry", "allwinner,sun4i-a10"; ··· 79 77 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 80 78 vmmc-supply = <&reg_vcc3v3>; 81 79 bus-width = <4>; 82 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 80 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 83 81 cd-inverted; 84 82 status = "okay"; 85 83 }; ··· 159 157 regulator-min-microvolt = <3300000>; 160 158 regulator-max-microvolt = <3300000>; 161 159 enable-active-high; 162 - gpio = <&pio 7 19 0>; 160 + gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>; 163 161 }; 164 162 165 163 reg_usb1_vbus: usb1-vbus { ··· 168 166 169 167 reg_usb2_vbus: usb2-vbus { 170 168 pinctrl-0 = <&usb2_vbus_pin_hackberry>; 171 - gpio = <&pio 7 12 0>; 169 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 172 170 status = "okay"; 173 171 }; 174 172 };
+3 -1
arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
··· 51 51 #include "sun4i-a10.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "INet-97F Rev 02"; 56 58 compatible = "primux,inet97fv2", "allwinner,sun4i-a10"; ··· 67 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 68 66 vmmc-supply = <&reg_vcc3v3>; 69 67 bus-width = <4>; 70 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 68 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 71 69 cd-inverted; 72 70 status = "okay"; 73 71 };
+3 -1
arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
··· 51 51 #include "sun4i-a10.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "PineRiver Mini X-Plus"; 56 58 compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10"; ··· 63 61 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 64 62 vmmc-supply = <&reg_vcc3v3>; 65 63 bus-width = <4>; 66 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 64 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 67 65 cd-inverted; 68 66 status = "okay"; 69 67 };
+5 -3
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
··· 49 49 #include "sun4i-a10.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "Olimex A10-OLinuXino-LIME"; 54 56 compatible = "olimex,a10-olinuxino-lime", "allwinner,sun4i-a10"; ··· 76 74 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 77 75 vmmc-supply = <&reg_vcc3v3>; 78 76 bus-width = <4>; 79 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 77 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 80 78 cd-inverted; 81 79 status = "okay"; 82 80 }; ··· 153 151 154 152 green { 155 153 label = "a10-olinuxino-lime:green:usr"; 156 - gpios = <&pio 7 2 0>; 154 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 157 155 default-state = "on"; 158 156 }; 159 157 }; 160 158 161 159 reg_ahci_5v: ahci-5v { 162 160 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 163 - gpio = <&pio 2 3 0>; 161 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 164 162 status = "okay"; 165 163 }; 166 164
+3 -1
arch/arm/boot/dts/sun4i-a10-pcduino.dts
··· 50 50 #include "sun4i-a10.dtsi" 51 51 #include "sunxi-common-regulators.dtsi" 52 52 53 + #include <dt-bindings/gpio/gpio.h> 54 + 53 55 / { 54 56 model = "LinkSprite pcDuino"; 55 57 compatible = "linksprite,a10-pcduino", "allwinner,sun4i-a10"; ··· 77 75 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 78 76 vmmc-supply = <&reg_vcc3v3>; 79 77 bus-width = <4>; 80 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 78 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 81 79 cd-inverted; 82 80 status = "okay"; 83 81 };
+6 -4
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
··· 50 50 /dts-v1/; 51 51 #include "sun5i-a10s.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 53 55 #include <dt-bindings/input/input.h> 54 56 55 57 / { ··· 79 77 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>; 80 78 vmmc-supply = <&reg_vcc3v3>; 81 79 bus-width = <4>; 82 - cd-gpios = <&pio 6 1 0>; /* PG1 */ 80 + cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 83 81 cd-inverted; 84 82 status = "okay"; 85 83 }; ··· 89 87 pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>; 90 88 vmmc-supply = <&reg_vcc3v3>; 91 89 bus-width = <4>; 92 - cd-gpios = <&pio 6 13 0>; /* PG13 */ 90 + cd-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ 93 91 cd-inverted; 94 92 status = "okay"; 95 93 }; ··· 228 226 229 227 green { 230 228 label = "a10s-olinuxino-micro:green:usr"; 231 - gpios = <&pio 4 3 0>; 229 + gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; 232 230 default-state = "on"; 233 231 }; 234 232 }; 235 233 236 234 reg_usb1_vbus: usb1-vbus { 237 235 pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>; 238 - gpio = <&pio 1 10 0>; 236 + gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; 239 237 status = "okay"; 240 238 }; 241 239 };
+5 -3
arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts
··· 49 49 #include "sun5i-a10s.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "R7 A10s hdmi tv-stick"; 54 56 compatible = "allwinner,r7-tv-dongle", "allwinner,sun5i-a10s"; ··· 61 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_r7>; 62 60 vmmc-supply = <&reg_vcc3v3>; 63 61 bus-width = <4>; 64 - cd-gpios = <&pio 6 1 0>; /* PG1 */ 62 + cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 65 63 cd-inverted; 66 64 status = "okay"; 67 65 }; ··· 125 123 126 124 green { 127 125 label = "r7-tv-dongle:green:usr"; 128 - gpios = <&pio 1 2 0>; 126 + gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; 129 127 default-state = "on"; 130 128 }; 131 129 }; 132 130 133 131 reg_usb1_vbus: usb1-vbus { 134 132 pinctrl-0 = <&usb1_vbus_pin_r7>; 135 - gpio = <&pio 6 13 0>; 133 + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; 136 134 status = "okay"; 137 135 }; 138 136 };
+3 -1
arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
··· 49 49 #include "sun5i-a13.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "HSG H702"; 54 56 compatible = "hsg,h702", "allwinner,sun5i-a13"; ··· 61 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_h702>; 62 60 vmmc-supply = <&reg_vcc3v3>; 63 61 bus-width = <4>; 64 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 62 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 65 63 cd-inverted; 66 64 status = "okay"; 67 65 };
+5 -3
arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
··· 50 50 #include "sun5i-a13.dtsi" 51 51 #include "sunxi-common-regulators.dtsi" 52 52 53 + #include <dt-bindings/gpio/gpio.h> 54 + 53 55 / { 54 56 model = "Olimex A13-Olinuxino Micro"; 55 57 compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; ··· 62 60 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>; 63 61 vmmc-supply = <&reg_vcc3v3>; 64 62 bus-width = <4>; 65 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 63 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 66 64 cd-inverted; 67 65 status = "okay"; 68 66 }; ··· 135 133 136 134 power { 137 135 label = "a13-olinuxino-micro:green:power"; 138 - gpios = <&pio 6 9 0>; 136 + gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>; 139 137 default-state = "on"; 140 138 }; 141 139 }; 142 140 143 141 reg_usb1_vbus: usb1-vbus { 144 142 pinctrl-0 = <&usb1_vbus_pin_olinuxinom>; 145 - gpio = <&pio 6 11 0>; 143 + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; 146 144 status = "okay"; 147 145 }; 148 146 };
+5 -3
arch/arm/boot/dts/sun5i-a13-olinuxino.dts
··· 50 50 /dts-v1/; 51 51 #include "sun5i-a13.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 + 54 + #include <dt-bindings/gpio/gpio.h> 53 55 #include <dt-bindings/input/input.h> 54 56 55 57 / { ··· 64 62 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>; 65 63 vmmc-supply = <&reg_vcc3v3>; 66 64 bus-width = <4>; 67 - cd-gpios = <&pio 6 0 0>; /* PG0 */ 65 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 68 66 cd-inverted; 69 67 status = "okay"; 70 68 }; ··· 176 174 pinctrl-0 = <&led_pins_olinuxino>; 177 175 178 176 power { 179 - gpios = <&pio 6 9 0>; 177 + gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>; 180 178 default-state = "on"; 181 179 }; 182 180 }; 183 181 184 182 reg_usb1_vbus: usb1-vbus { 185 183 pinctrl-0 = <&usb1_vbus_pin_olinuxino>; 186 - gpio = <&pio 6 11 0>; 184 + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; 187 185 status = "okay"; 188 186 }; 189 187 };
+3 -1
arch/arm/boot/dts/sun6i-a31-app4-evb1.dts
··· 51 51 #include "sun6i-a31.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Allwinner A31 APP4 EVB1 Evaluation Board"; 56 58 compatible = "allwinner,app4-evb1", "allwinner,sun6i-a31"; ··· 89 87 90 88 reg_usb1_vbus: usb1-vbus { 91 89 pinctrl-0 = <&usb1_vbus_pin_a>; 92 - gpio = <&pio 7 27 0>; 90 + gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>; 93 91 status = "okay"; 94 92 }; 95 93 };
+4 -2
arch/arm/boot/dts/sun6i-a31-colombus.dts
··· 51 51 #include "sun6i-a31.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "WITS A31 Colombus Evaluation Board"; 56 58 compatible = "wits,colombus", "allwinner,sun6i-a31"; ··· 67 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>; 68 66 vmmc-supply = <&reg_vcc3v0>; 69 67 bus-width = <4>; 70 - cd-gpios = <&pio 0 8 0>; /* PA8 */ 68 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 71 69 cd-inverted; 72 70 status = "okay"; 73 71 }; ··· 129 127 reg_usb2_vbus: usb2-vbus { 130 128 pinctrl-names = "default"; 131 129 pinctrl-0 = <&usb2_vbus_pin_colombus>; 132 - gpio = <&pio 7 24 0>; 130 + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; 133 131 status = "okay"; 134 132 }; 135 133 };
+5 -3
arch/arm/boot/dts/sun6i-a31-hummingbird.dts
··· 51 51 #include "sun6i-a31.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Merrii A31 Hummingbird"; 56 58 compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31"; ··· 67 65 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; 68 66 vmmc-supply = <&reg_vcc3v0>; 69 67 bus-width = <4>; 70 - cd-gpios = <&pio 0 8 0>; /* PA8 */ 68 + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 71 69 cd-inverted; 72 70 status = "okay"; 73 71 }; ··· 141 139 pinctrl-0 = <&gmac_pins_rgmii_a>; 142 140 phy = <&phy1>; 143 141 phy-mode = "rgmii"; 144 - snps,reset-gpio = <&pio 0 21 0>; 142 + snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; 145 143 snps,reset-active-low; 146 144 snps,reset-delays-us = <0 10000 30000>; 147 145 status = "okay"; ··· 154 152 155 153 reg_usb1_vbus: usb1-vbus { 156 154 pinctrl-0 = <&usb1_vbus_pin_a>; 157 - gpio = <&pio 7 24 0>; /* PH24 */ 155 + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ 158 156 status = "okay"; 159 157 }; 160 158 };
+5 -3
arch/arm/boot/dts/sun6i-a31-m9.dts
··· 49 49 #include "sun6i-a31.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "Mele M9 / A1000G Quad top set box"; 54 56 compatible = "mele,m9", "allwinner,sun6i-a31"; ··· 65 63 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; 66 64 vmmc-supply = <&reg_vcc3v3>; 67 65 bus-width = <4>; 68 - cd-gpios = <&pio 7 22 0>; /* PH22 */ 66 + cd-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */ 69 67 cd-inverted; 70 68 status = "okay"; 71 69 }; ··· 138 136 139 137 blue { 140 138 label = "m9:blue:usr"; 141 - gpios = <&pio 7 13 0>; 139 + gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; 142 140 }; 143 141 }; 144 142 145 143 reg_usb1_vbus: usb1-vbus { 146 144 pinctrl-names = "default"; 147 145 pinctrl-0 = <&usb1_vbus_pin_m9>; 148 - gpio = <&pio 2 27 0>; 146 + gpio = <&pio 2 27 GPIO_ACTIVE_HIGH>; 149 147 status = "okay"; 150 148 }; 151 149 };
+5 -3
arch/arm/boot/dts/sun7i-a20-bananapi.dts
··· 51 51 #include "sun7i-a20.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "LeMaker Banana Pi"; 56 58 compatible = "lemaker,bananapi", "allwinner,sun7i-a20"; ··· 69 67 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>; 70 68 vmmc-supply = <&reg_vcc3v3>; 71 69 bus-width = <4>; 72 - cd-gpios = <&pio 7 10 0>; /* PH10 */ 70 + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ 73 71 cd-inverted; 74 72 status = "okay"; 75 73 }; ··· 190 188 191 189 green { 192 190 label = "bananapi:green:usr"; 193 - gpios = <&pio 7 24 0>; 191 + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; 194 192 }; 195 193 }; 196 194 ··· 211 209 regulator-max-microvolt = <3300000>; 212 210 startup-delay-us = <100000>; 213 211 enable-active-high; 214 - gpio = <&pio 7 23 0>; 212 + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; 215 213 }; 216 214 };
+5 -3
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
··· 15 15 #include "sun7i-a20.dtsi" 16 16 #include "sunxi-common-regulators.dtsi" 17 17 18 + #include <dt-bindings/gpio/gpio.h> 19 + 18 20 / { 19 21 model = "Cubietech Cubieboard2"; 20 22 compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; ··· 27 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 28 26 vmmc-supply = <&reg_vcc3v3>; 29 27 bus-width = <4>; 30 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 31 29 cd-inverted; 32 30 status = "okay"; 33 31 }; ··· 122 120 123 121 blue { 124 122 label = "cubieboard2:blue:usr"; 125 - gpios = <&pio 7 21 0>; 123 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; 126 124 }; 127 125 128 126 green { 129 127 label = "cubieboard2:green:usr"; 130 - gpios = <&pio 7 20 0>; 128 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 131 129 }; 132 130 }; 133 131
+10 -8
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
··· 15 15 #include "sun7i-a20.dtsi" 16 16 #include "sunxi-common-regulators.dtsi" 17 17 18 + #include <dt-bindings/gpio/gpio.h> 19 + 18 20 / { 19 21 model = "Cubietech Cubietruck"; 20 22 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; ··· 27 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 28 26 vmmc-supply = <&reg_vcc3v3>; 29 27 bus-width = <4>; 30 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 31 29 cd-inverted; 32 30 status = "okay"; 33 31 }; ··· 170 168 171 169 blue { 172 170 label = "cubietruck:blue:usr"; 173 - gpios = <&pio 7 21 0>; 171 + gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; 174 172 }; 175 173 176 174 orange { 177 175 label = "cubietruck:orange:usr"; 178 - gpios = <&pio 7 20 0>; 176 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 179 177 }; 180 178 181 179 white { 182 180 label = "cubietruck:white:usr"; 183 - gpios = <&pio 7 11 0>; 181 + gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; 184 182 }; 185 183 186 184 green { 187 185 label = "cubietruck:green:usr"; 188 - gpios = <&pio 7 7 0>; 186 + gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; 189 187 }; 190 188 }; 191 189 192 190 reg_ahci_5v: ahci-5v { 193 191 pinctrl-0 = <&ahci_pwr_pin_cubietruck>; 194 - gpio = <&pio 7 12 0>; 192 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 195 193 status = "okay"; 196 194 }; 197 195 198 196 reg_usb0_vbus: usb0-vbus { 199 197 pinctrl-0 = <&usb0_vbus_pin_a>; 200 - gpio = <&pio 7 17 0>; 198 + gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>; 201 199 status = "okay"; 202 200 }; 203 201 ··· 217 215 regulator-min-microvolt = <3300000>; 218 216 regulator-max-microvolt = <3300000>; 219 217 enable-active-high; 220 - gpio = <&pio 7 9 0>; 218 + gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; 221 219 }; 222 220 };
+8 -6
arch/arm/boot/dts/sun7i-a20-hummingbird.dts
··· 15 15 #include "sun7i-a20.dtsi" 16 16 #include "sunxi-common-regulators.dtsi" 17 17 18 + #include <dt-bindings/gpio/gpio.h> 19 + 18 20 / { 19 21 model = "Merrii A20 Hummingbird"; 20 22 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; ··· 27 25 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 28 26 vmmc-supply = <&reg_vcc3v0>; 29 27 bus-width = <4>; 30 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 28 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 31 29 cd-inverted; 32 30 status = "okay"; 33 31 }; ··· 186 184 phy-mode = "rgmii"; 187 185 phy-supply = <&reg_gmac_vdd>; 188 186 /* phy reset config */ 189 - snps,reset-gpio = <&pio 0 17 0>; /* PA17 */ 187 + snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ 190 188 snps,reset-active-low; 191 189 /* wait 1s after reset, otherwise fail to read phy id */ 192 190 snps,reset-delays-us = <0 10000 1000000>; ··· 200 198 201 199 reg_ahci_5v: ahci-5v { 202 200 pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>; 203 - gpio = <&pio 7 15 0>; /* PH15 */ 201 + gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 204 202 status = "okay"; 205 203 }; 206 204 207 205 reg_usb1_vbus: usb1-vbus { 208 206 pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>; 209 - gpio = <&pio 7 2 0>; /* PH2 */ 207 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 210 208 status = "okay"; 211 209 }; 212 210 ··· 222 220 regulator-min-microvolt = <3000000>; 223 221 regulator-max-microvolt = <3000000>; 224 222 enable-active-high; 225 - gpio = <&pio 7 9 0>; /* PH9 */ 223 + gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ 226 224 }; 227 225 228 226 reg_gmac_vdd: gmac_vdd { ··· 233 231 regulator-min-microvolt = <3000000>; 234 232 regulator-max-microvolt = <3000000>; 235 233 enable-active-high; 236 - gpio = <&pio 7 16 0>; /* PH16 */ 234 + gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */ 237 235 }; 238 236 };
+8 -6
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
··· 49 49 #include "sun7i-a20.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "I12 / Q5 / QT840A A20 tvbox"; 54 56 compatible = "allwinner,i12-tvbox", "allwinner,sun7i-a20"; ··· 61 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 62 60 vmmc-supply = <&reg_vcc3v3>; 63 61 bus-width = <4>; 64 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 62 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 65 63 cd-inverted; 66 64 status = "okay"; 67 65 }; ··· 181 179 182 180 red { 183 181 label = "i12_tvbox:red:usr"; 184 - gpios = <&pio 7 9 1>; 182 + gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; 185 183 }; 186 184 187 185 blue { 188 186 label = "i12_tvbox:blue:usr"; 189 - gpios = <&pio 7 20 0>; 187 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 190 188 }; 191 189 }; 192 190 ··· 206 204 regulator-min-microvolt = <3300000>; 207 205 regulator-max-microvolt = <3300000>; 208 206 enable-active-high; 209 - gpio = <&pio 7 2 0>; 207 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; 210 208 }; 211 209 212 210 reg_vmmc3_io: vmmc3-io { ··· 219 217 /* This controls VCC-PI, must be always on! */ 220 218 regulator-always-on; 221 219 enable-active-high; 222 - gpio = <&pio 7 12 0>; 220 + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; 223 221 }; 224 222 225 223 reg_gmac_3v3: gmac-3v3 { ··· 231 229 regulator-max-microvolt = <3300000>; 232 230 startup-delay-us = <50000>; 233 231 enable-active-high; 234 - gpio = <&pio 7 21 0>; 232 + gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; 235 233 }; 236 234 };
+4 -2
arch/arm/boot/dts/sun7i-a20-m3.dts
··· 51 51 #include "sun7i-a20.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Mele M3"; 56 58 compatible = "mele,m3", "allwinner,sun7i-a20"; ··· 63 61 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 64 62 vmmc-supply = <&reg_vcc3v3>; 65 63 bus-width = <4>; 66 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 64 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 67 65 cd-inverted; 68 66 status = "okay"; 69 67 }; ··· 156 154 157 155 blue { 158 156 label = "m3:blue:usr"; 159 - gpios = <&pio 7 20 0>; 157 + gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; 160 158 }; 161 159 }; 162 160
+5 -3
arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts
··· 52 52 #include "sun7i-a20.dtsi" 53 53 #include "sunxi-common-regulators.dtsi" 54 54 55 + #include <dt-bindings/gpio/gpio.h> 56 + 55 57 / { 56 58 model = "Olimex A20-OLinuXino-LIME"; 57 59 compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20"; ··· 64 62 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 65 63 vmmc-supply = <&reg_vcc3v3>; 66 64 bus-width = <4>; 67 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 65 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 68 66 cd-inverted; 69 67 status = "okay"; 70 68 }; ··· 154 152 155 153 green { 156 154 label = "a20-olinuxino-lime:green:usr"; 157 - gpios = <&pio 7 2 0>; 155 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 158 156 default-state = "on"; 159 157 }; 160 158 }; 161 159 162 160 reg_ahci_5v: ahci-5v { 163 161 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 164 - gpio = <&pio 2 3 0>; 162 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 165 163 status = "okay"; 166 164 }; 167 165
+5 -3
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
··· 49 49 #include "sun7i-a20.dtsi" 50 50 #include "sunxi-common-regulators.dtsi" 51 51 52 + #include <dt-bindings/gpio/gpio.h> 53 + 52 54 / { 53 55 model = "Olimex A20-OLinuXino-LIME2"; 54 56 compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20"; ··· 61 59 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 62 60 vmmc-supply = <&reg_vcc3v3>; 63 61 bus-width = <4>; 64 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 62 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 65 63 cd-inverted; 66 64 status = "okay"; 67 65 }; ··· 201 199 202 200 green { 203 201 label = "a20-olinuxino-lime2:green:usr"; 204 - gpios = <&pio 7 2 0>; 202 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 205 203 default-state = "on"; 206 204 }; 207 205 }; 208 206 209 207 reg_ahci_5v: ahci-5v { 210 208 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 211 - gpio = <&pio 2 3 0>; 209 + gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 212 210 status = "okay"; 213 211 }; 214 212
+5 -3
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
··· 14 14 /dts-v1/; 15 15 #include "sun7i-a20.dtsi" 16 16 #include "sunxi-common-regulators.dtsi" 17 + 18 + #include <dt-bindings/gpio/gpio.h> 17 19 #include <dt-bindings/input/input.h> 18 20 19 21 / { ··· 39 37 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 40 38 vmmc-supply = <&reg_vcc3v3>; 41 39 bus-width = <4>; 42 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 40 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 43 41 cd-inverted; 44 42 status = "okay"; 45 43 }; ··· 49 47 pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>; 50 48 vmmc-supply = <&reg_vcc3v3>; 51 49 bus-width = <4>; 52 - cd-gpios = <&pio 7 11 0>; /* PH11 */ 50 + cd-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ 53 51 cd-inverted; 54 52 status = "okay"; 55 53 }; ··· 223 221 224 222 green { 225 223 label = "a20-olinuxino-micro:green:usr"; 226 - gpios = <&pio 7 2 0>; 224 + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 227 225 default-state = "on"; 228 226 }; 229 227 };
+2 -2
arch/arm/boot/dts/sun7i-a20-pcduino3.dts
··· 63 63 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 64 64 vmmc-supply = <&reg_vcc3v3>; 65 65 bus-width = <4>; 66 - cd-gpios = <&pio 7 1 0>; /* PH1 */ 66 + cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 67 67 cd-inverted; 68 68 status = "okay"; 69 69 }; ··· 204 204 }; 205 205 206 206 reg_ahci_5v: ahci-5v { 207 - gpio = <&pio 7 2 0>; 207 + gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; 208 208 status = "okay"; 209 209 }; 210 210 };
+3 -1
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
··· 51 51 #include "sun8i-a23.dtsi" 52 52 #include "sunxi-common-regulators.dtsi" 53 53 54 + #include <dt-bindings/gpio/gpio.h> 55 + 54 56 / { 55 57 model = "Ippo Q8H Dual Core Tablet (v5)"; 56 58 compatible = "ippo,q8h-v5", "allwinner,sun8i-a23"; ··· 71 69 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>; 72 70 vmmc-supply = <&reg_vcc3v0>; 73 71 bus-width = <4>; 74 - cd-gpios = <&pio 1 4 0>; /* PB4 */ 72 + cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 75 73 cd-inverted; 76 74 status = "okay"; 77 75 };
+4 -2
arch/arm/boot/dts/sun9i-a80-optimus.dts
··· 50 50 /dts-v1/; 51 51 #include "sun9i-a80.dtsi" 52 52 53 + #include <dt-bindings/gpio/gpio.h> 54 + 53 55 / { 54 56 model = "Merrii A80 Optimus Board"; 55 57 compatible = "merrii,a80-optimus", "allwinner,sun9i-a80"; ··· 108 106 109 107 led2 { 110 108 label = "optimus:led2:usr"; 111 - gpios = <&pio 7 1 0>; 109 + gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; 112 110 }; 113 111 114 112 /* led3 is on PM15, in R_PIO */ 115 113 116 114 led4 { 117 115 label = "optimus:led4:usr"; 118 - gpios = <&pio 7 0 0>; 116 + gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; 119 117 }; 120 118 }; 121 119 };
+6 -4
arch/arm/boot/dts/sunxi-common-regulators.dtsi
··· 47 47 * OTHER DEALINGS IN THE SOFTWARE. 48 48 */ 49 49 50 + #include <dt-bindings/gpio/gpio.h> 51 + 50 52 / { 51 53 soc@01c00000 { 52 54 pio: pinctrl@01c20800 { ··· 91 89 regulator-max-microvolt = <5000000>; 92 90 regulator-boot-on; 93 91 enable-active-high; 94 - gpio = <&pio 1 8 0>; 92 + gpio = <&pio 1 8 GPIO_ACTIVE_HIGH>; 95 93 status = "disabled"; 96 94 }; 97 95 ··· 103 101 regulator-min-microvolt = <5000000>; 104 102 regulator-max-microvolt = <5000000>; 105 103 enable-active-high; 106 - gpio = <&pio 1 9 0>; 104 + gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; 107 105 status = "disabled"; 108 106 }; 109 107 ··· 115 113 regulator-min-microvolt = <5000000>; 116 114 regulator-max-microvolt = <5000000>; 117 115 enable-active-high; 118 - gpio = <&pio 7 6 0>; 116 + gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; 119 117 status = "disabled"; 120 118 }; 121 119 ··· 127 125 regulator-min-microvolt = <5000000>; 128 126 regulator-max-microvolt = <5000000>; 129 127 enable-active-high; 130 - gpio = <&pio 7 3 0>; 128 + gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>; 131 129 status = "disabled"; 132 130 }; 133 131