Sfoglia il codice sorgente

treewide: replace numbers with GPIO_ACTIVE

The latter is more descriptive in terms of what's going on.

Mostly found with

git grep gpios\  | grep 0\>
git grep gpios\  | grep 1\>

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <[email protected]>
Rosen Penev 3 mesi fa
parent
commit
c186d17fa5

+ 3 - 3
target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts

@@ -74,21 +74,21 @@
 
 
 	gpio_ext_lna0 {
 	gpio_ext_lna0 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <20 0>;
+		gpios = <20 GPIO_ACTIVE_HIGH>;
 		output-low;
 		output-low;
 		line-name = "hiveap-121:ext:lna0";
 		line-name = "hiveap-121:ext:lna0";
 	};
 	};
 
 
 	gpio_ext_lna1 {
 	gpio_ext_lna1 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <19 0>;
+		gpios = <19 GPIO_ACTIVE_HIGH>;
 		output-low;
 		output-low;
 		line-name = "hiveap-121:ext:lna1";
 		line-name = "hiveap-121:ext:lna1";
 	};
 	};
 
 
 	gpio_usb_power {
 	gpio_usb_power {
 		gpio-hog;
 		gpio-hog;
-		gpios = <15 0>;
+		gpios = <15 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "hiveap-121:power:usb";
 		line-name = "hiveap-121:power:usb";
 	};
 	};

+ 2 - 2
target/linux/ath79/dts/ar9344_qihoo_c301.dts

@@ -82,14 +82,14 @@
 &gpio {
 &gpio {
 	gpio_ext_lna0 {
 	gpio_ext_lna0 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <14 0>;
+		gpios = <14 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "c301:ext:lna0";
 		line-name = "c301:ext:lna0";
 	};
 	};
 
 
 	gpio_ext_lna1 {
 	gpio_ext_lna1 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <15 0>;
+		gpios = <15 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "c301:ext:lna1";
 		line-name = "c301:ext:lna1";
 	};
 	};

+ 2 - 2
target/linux/ath79/dts/ar9344_wd_mynet-n600.dts

@@ -60,14 +60,14 @@
 &gpio {
 &gpio {
 	gpio_ext_lna0 {
 	gpio_ext_lna0 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <14 0>;
+		gpios = <14 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "ext:lna0";
 		line-name = "ext:lna0";
 	};
 	};
 
 
 	gpio_ext_lna1 {
 	gpio_ext_lna1 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <15 0>;
+		gpios = <15 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "ext:lna1";
 		line-name = "ext:lna1";
 	};
 	};

+ 2 - 2
target/linux/ath79/dts/ar9344_wd_mynet-n750.dts

@@ -59,14 +59,14 @@
 &gpio {
 &gpio {
 	gpio_ext_lna0 {
 	gpio_ext_lna0 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <15 0>;
+		gpios = <15 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "ext:lna0";
 		line-name = "ext:lna0";
 	};
 	};
 
 
 	gpio_ext_lna1 {
 	gpio_ext_lna1 {
 		gpio-hog;
 		gpio-hog;
-		gpios = <18 0>;
+		gpios = <18 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 		line-name = "ext:lna1";
 		line-name = "ext:lna1";
 	};
 	};

+ 1 - 1
target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi

@@ -36,7 +36,7 @@
 &gpio {
 &gpio {
 	gpio_usb_power: usb_power {
 	gpio_usb_power: usb_power {
 		gpio-hog;
 		gpio-hog;
-		gpios = <16 0>;
+		gpios = <16 GPIO_ACTIVE_HIGH>;
 		output-high;
 		output-high;
 	};
 	};
 };
 };

+ 2 - 2
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx.dtsi

@@ -52,7 +52,7 @@
 
 
 			reset {
 			reset {
 				label = "reset";
 				label = "reset";
-				gpios = <&tlmm 4 1>;
+				gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
 				linux,code = <KEY_RESTART>;
 				linux,code = <KEY_RESTART>;
 			};
 			};
 		};
 		};
@@ -141,7 +141,7 @@
 &blsp1_spi1 {
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";
 	pinctrl-names = "default";
-	cs-gpios = <&tlmm 54 0>, <&tlmm 63 0>;
+	cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 63 GPIO_ACTIVE_HIGH>;
 	num-cs = <2>;
 	num-cs = <2>;
 	status = "okay";
 	status = "okay";
 
 

+ 1 - 1
target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-onhub.dtsi

@@ -405,7 +405,7 @@
 		pinctrl-0 = <&spi_pins>;
 		pinctrl-0 = <&spi_pins>;
 		pinctrl-names = "default";
 		pinctrl-names = "default";
 
 
-		cs-gpios = <&qcom_pinmux 20 0>;
+		cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
 
 		flash: flash@0 {
 		flash: flash@0 {
 			compatible = "jedec,spi-nor";
 			compatible = "jedec,spi-nor";

+ 1 - 1
target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-unifi-ac-hd.dts

@@ -100,7 +100,7 @@
 
 
 		pinctrl-0 = <&spi_pins>;
 		pinctrl-0 = <&spi_pins>;
 		pinctrl-names = "default";
 		pinctrl-names = "default";
-		cs-gpios = <&qcom_pinmux 20 0>;
+		cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
 
 		flash@0 {
 		flash@0 {
 			compatible = "mx25u25635f", "jedec,spi-nor";
 			compatible = "mx25u25635f", "jedec,spi-nor";

+ 3 - 3
target/linux/kirkwood/files/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts

@@ -57,13 +57,13 @@
 		button@1 {
 		button@1 {
 			label = "Reset push button";
 			label = "Reset push button";
 			linux,code = <KEY_RESTART>;
 			linux,code = <KEY_RESTART>;
-			gpios = <&gpio0 28 1>;
+			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
 		};
 		};
 
 
 		button@2 {
 		button@2 {
 			label = "USB unmount button";
 			label = "USB unmount button";
 			linux,code = <KEY_EJECTCD>;
 			linux,code = <KEY_EJECTCD>;
-			gpios = <&gpio0 27 1>;
+			gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
 		};
 		};
 	};
 	};
 
 
@@ -127,7 +127,7 @@
 			enable-active-high;
 			enable-active-high;
 			regulator-always-on;
 			regulator-always-on;
 			regulator-boot-on;
 			regulator-boot-on;
-			gpios = <&gpio0 24 0>;
+			gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
 		};
 		};
 	};
 	};
 };
 };

+ 1 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts

@@ -105,7 +105,7 @@
 		};
 		};
 		voice {
 		voice {
 			label = "blue:sprache";
 			label = "blue:sprache";
-			gpios = <&gpiomm 4 1>;
+			gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>;
 		};
 		};
 		led_usb: usb {
 		led_usb: usb {
 			function = LED_FUNCTION_USB;
 			function = LED_FUNCTION_USB;

+ 2 - 1
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon.dtsi

@@ -172,7 +172,8 @@
 			reg = <0x200000 0x10000>;
 			reg = <0x200000 0x10000>;
 			interrupt-parent = <&icu0>;
 			interrupt-parent = <&icu0>;
 			interrupts = <18 19 20 21>;
 			interrupts = <18 19 20 21>;
-			gpios = <&gpio1 7 0 &gpio1 8 0>;
+			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>,
+				<&gpio1 8 GPIO_ACTIVE_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c_pins>;
 			pinctrl-0 = <&i2c_pins>;
 			clocks = <&clock_sys1 14>;
 			clocks = <&clock_sys1 14>;

+ 1 - 1
target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi

@@ -84,7 +84,7 @@
 			#interrupt-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
 			interrupt-parent = <&pio>;
 			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
 			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
-			reset-gpios = <&pio 54 0>;
+			reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
 
 			ports {
 			ports {
 				#address-cells = <1>;
 				#address-cells = <1>;

+ 1 - 1
target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi

@@ -146,7 +146,7 @@
 			#interrupt-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
 			interrupt-parent = <&pio>;
 			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
 			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
-			reset-gpios = <&pio 54 0>;
+			reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
 
 			ports {
 			ports {
 				#address-cells = <1>;
 				#address-cells = <1>;

+ 1 - 1
target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts

@@ -130,7 +130,7 @@
 		switch@1f {
 		switch@1f {
 			compatible = "mediatek,mt7531";
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reg = <31>;
-			reset-gpios = <&pio 28 0>;
+			reset-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
 			interrupt-controller;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
 			interrupt-parent = <&pio>;

+ 1 - 1
target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts

@@ -108,7 +108,7 @@
 		switch@1f {
 		switch@1f {
 			compatible = "mediatek,mt7531";
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reg = <31>;
-			reset-gpios = <&pio 28 0>;
+			reset-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
 			interrupt-controller;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
 			interrupt-parent = <&pio>;

+ 1 - 1
target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts

@@ -122,7 +122,7 @@
 		switch@1f {
 		switch@1f {
 			compatible = "mediatek,mt7531";
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reg = <31>;
-			reset-gpios = <&pio 39 0>;
+			reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
 
 
 			ports {
 			ports {
 				#address-cells = <1>;
 				#address-cells = <1>;

+ 1 - 1
target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts

@@ -170,7 +170,7 @@
 		switch@1f {
 		switch@1f {
 			compatible = "mediatek,mt7531";
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reg = <31>;
-			reset-gpios = <&pio 39 0>;
+			reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
 			interrupt-controller;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
 			interrupt-parent = <&pio>;

+ 3 - 2
target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi

@@ -5,6 +5,7 @@
  */
  */
 
 
 /dts-v1/;
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/mt65xx.h>
 #include <dt-bindings/pinctrl/mt65xx.h>
 #include "mt7986a.dtsi"
 #include "mt7986a.dtsi"
 
 
@@ -92,7 +93,7 @@
 		compatible = "ethernet-phy-id67c9.de0a";
 		compatible = "ethernet-phy-id67c9.de0a";
 		reg = <5>;
 		reg = <5>;
 
 
-		reset-gpios = <&pio 6 1>;
+		reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
 		reset-deassert-us = <20000>;
 		reset-deassert-us = <20000>;
 	};
 	};
 
 
@@ -104,7 +105,7 @@
 	switch: switch@1f {
 	switch: switch@1f {
 		compatible = "mediatek,mt7531";
 		compatible = "mediatek,mt7531";
 		reg = <31>;
 		reg = <31>;
-		reset-gpios = <&pio 5 0>;
+		reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
 	};
 	};
 };
 };
 
 

+ 3 - 2
target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn6130_cisco_vedge1000.dts

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 
 /include/ "octeon_3xxx.dtsi"
 /include/ "octeon_3xxx.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 
 / {
 / {
 	compatible = "cisco,vedge1000", "cavium,cn6130";
 	compatible = "cisco,vedge1000", "cavium,cn6130";
@@ -168,8 +169,8 @@
 				reg = <0x00>;
 				reg = <0x00>;
 				voltage-ranges = <0xce4 0xce4>;
 				voltage-ranges = <0xce4 0xce4>;
 				max-frequency = <0x3197500>;
 				max-frequency = <0x3197500>;
-				wp-gpios = <&gpio 0x02 0x00>;
-				cd-gpios = <&gpio 0x03 0x01>;
+				wp-gpios = <&gpio 0x02 GPIO_ACTIVE_HIGH>;
+				cd-gpios = <&gpio 0x03 GPIO_ACTIVE_LOW>;
 				cavium,bus-max-width = <0x04>;
 				cavium,bus-max-width = <0x04>;
 			};
 			};
 		};
 		};