treewide: replace numbers with GPIO_ACTIVE
authorRosen Penev <[email protected]>
Sun, 21 Sep 2025 04:11:32 +0000 (21:11 -0700)
committerRobert Marko <[email protected]>
Wed, 8 Oct 2025 12:26:24 +0000 (14:26 +0200)
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]>
19 files changed:
target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
target/linux/ath79/dts/ar9344_qihoo_c301.dts
target/linux/ath79/dts/ar9344_wd_mynet-n600.dts
target/linux/ath79/dts/ar9344_wd_mynet-n750.dts
target/linux/ath79/dts/qca955x_zyxel_nbg6x16.dtsi
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx.dtsi
target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-onhub.dtsi
target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-unifi-ac-hd.dts
target/linux/kirkwood/files/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon.dtsi
target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts
target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts
target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn6130_cisco_vedge1000.dts

index 300b3b39bfaa6aa4596cfea5e1077e9337956d9a..68eb30e7ef593d4c8c31641ad8acd7b437a032bb 100644 (file)
 
        gpio_ext_lna0 {
                gpio-hog;
-               gpios = <20 0>;
+               gpios = <20 GPIO_ACTIVE_HIGH>;
                output-low;
                line-name = "hiveap-121:ext:lna0";
        };
 
        gpio_ext_lna1 {
                gpio-hog;
-               gpios = <19 0>;
+               gpios = <19 GPIO_ACTIVE_HIGH>;
                output-low;
                line-name = "hiveap-121:ext:lna1";
        };
 
        gpio_usb_power {
                gpio-hog;
-               gpios = <15 0>;
+               gpios = <15 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "hiveap-121:power:usb";
        };
index a63c8bc4d9a031e2d355462976e3d02c27a1b067..100bf838863b0259d884fad134b52ff0ddca2897 100644 (file)
 &gpio {
        gpio_ext_lna0 {
                gpio-hog;
-               gpios = <14 0>;
+               gpios = <14 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "c301:ext:lna0";
        };
 
        gpio_ext_lna1 {
                gpio-hog;
-               gpios = <15 0>;
+               gpios = <15 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "c301:ext:lna1";
        };
index c7149953be3e5a1e5a0834576b03f7f5d8e0b441..f85924a97cec784c6e68e676d9b3ce6e1204b5ca 100644 (file)
 &gpio {
        gpio_ext_lna0 {
                gpio-hog;
-               gpios = <14 0>;
+               gpios = <14 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "ext:lna0";
        };
 
        gpio_ext_lna1 {
                gpio-hog;
-               gpios = <15 0>;
+               gpios = <15 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "ext:lna1";
        };
index ecc1d182d15d6d4a7895069fddc0fc8155388004..da3f3b3614ae265f4ba7a23076a906d156e86804 100644 (file)
 &gpio {
        gpio_ext_lna0 {
                gpio-hog;
-               gpios = <15 0>;
+               gpios = <15 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "ext:lna0";
        };
 
        gpio_ext_lna1 {
                gpio-hog;
-               gpios = <18 0>;
+               gpios = <18 GPIO_ACTIVE_HIGH>;
                output-high;
                line-name = "ext:lna1";
        };
index 99f61afbc0407818c1d5f8fd7b9c5148626ad574..63b20b4725f21f0538746fd28b6ee718ab68e735 100644 (file)
@@ -36,7 +36,7 @@
 &gpio {
        gpio_usb_power: usb_power {
                gpio-hog;
-               gpios = <16 0>;
+               gpios = <16 GPIO_ACTIVE_HIGH>;
                output-high;
        };
 };
index cf59ff68fe5884e5075ae6dfb48500453795b734..cc43e222e4bb59220413c2019bf31f8361d933af 100644 (file)
@@ -52,7 +52,7 @@
 
                        reset {
                                label = "reset";
-                               gpios = <&tlmm 4 1>;
+                               gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
                                linux,code = <KEY_RESTART>;
                        };
                };
 &blsp1_spi1 {
        pinctrl-0 = <&spi_0_pins>;
        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>;
        status = "okay";
 
index 5b8de27ad69e518f49aa82fe319a36b1fbccb43b..2010c4f7b8c12097767912dffd801fa70a8a314f 100644 (file)
                pinctrl-0 = <&spi_pins>;
                pinctrl-names = "default";
 
-               cs-gpios = <&qcom_pinmux 20 0>;
+               cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
                flash: flash@0 {
                        compatible = "jedec,spi-nor";
index 3a1ad07ecdfb66cb70251baccd02f484e22edf1d..a1717a999bb7c2207efbc24b1e26662a262a583a 100644 (file)
 
                pinctrl-0 = <&spi_pins>;
                pinctrl-names = "default";
-               cs-gpios = <&qcom_pinmux 20 0>;
+               cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
 
                flash@0 {
                        compatible = "mx25u25635f", "jedec,spi-nor";
index cc2b3d0cd4d5a58040ff265e67cf1bc5b90a56ff..68afdbe468fd9eaacc9093ee4e599f311302ff85 100644 (file)
                button@1 {
                        label = "Reset push button";
                        linux,code = <KEY_RESTART>;
-                       gpios = <&gpio0 28 1>;
+                       gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
                };
 
                button@2 {
                        label = "USB unmount button";
                        linux,code = <KEY_EJECTCD>;
-                       gpios = <&gpio0 27 1>;
+                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
                };
        };
 
                        enable-active-high;
                        regulator-always-on;
                        regulator-boot-on;
-                       gpios = <&gpio0 24 0>;
+                       gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
                };
        };
 };
index 42c50e1e82296dd95c1ba33240805e76970bf332..b68fbf1d94c0cdbf476ced3d01fea370b96ea9cb 100644 (file)
                };
                voice {
                        label = "blue:sprache";
-                       gpios = <&gpiomm 4 1>;
+                       gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>;
                };
                led_usb: usb {
                        function = LED_FUNCTION_USB;
index 2f5557c0c7806e0a9952474b80ed46c7fc35a69a..5705e519f87eb9f145d81714eb1447cf2c9cbf44 100644 (file)
                        reg = <0x200000 0x10000>;
                        interrupt-parent = <&icu0>;
                        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-0 = <&i2c_pins>;
                        clocks = <&clock_sys1 14>;
index ae92fedc58940ac1d1f554381bf02dedff1e9def..476299461719068bf40b0c4371e0ea33100e9c24 100644 (file)
@@ -84,7 +84,7 @@
                        #interrupt-cells = <1>;
                        interrupt-parent = <&pio>;
                        interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
-                       reset-gpios = <&pio 54 0>;
+                       reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
                        ports {
                                #address-cells = <1>;
index 882ab841a7e110a572d3423cc000b40017721f63..7e9de8a7909f8294be0ed6838635fd69d181ed23 100644 (file)
                        #interrupt-cells = <1>;
                        interrupt-parent = <&pio>;
                        interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
-                       reset-gpios = <&pio 54 0>;
+                       reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
                        ports {
                                #address-cells = <1>;
index 7a3fa4deffbcdd6a1622866d9d5eca8b671ddd7f..aabf6e6dc154922608d14400e2ff99c9a45b63a3 100644 (file)
                switch@1f {
                        compatible = "mediatek,mt7531";
                        reg = <31>;
-                       reset-gpios = <&pio 28 0>;
+                       reset-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
                        interrupt-controller;
                        #interrupt-cells = <1>;
                        interrupt-parent = <&pio>;
index 70b7cde6d9af780b4ccf53c18f755843aac55e29..7c9b9a3d37d5d01fc490cdb6984ee1a693029afb 100644 (file)
                switch@1f {
                        compatible = "mediatek,mt7531";
                        reg = <31>;
-                       reset-gpios = <&pio 28 0>;
+                       reset-gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
                        interrupt-controller;
                        #interrupt-cells = <1>;
                        interrupt-parent = <&pio>;
index 604d318eaeadb6b5971c34943e7f822c770bc95a..c0e995fb9fa4d8231dc4d30b7a0f1fe0d3b21d22 100644 (file)
                switch@1f {
                        compatible = "mediatek,mt7531";
                        reg = <31>;
-                       reset-gpios = <&pio 39 0>;
+                       reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
 
                        ports {
                                #address-cells = <1>;
index fd08f724b5d1fc382ae71314fe3b824f6be94b16..1c1262c04030b3fa45d21c9b5c8a538328668d44 100644 (file)
                switch@1f {
                        compatible = "mediatek,mt7531";
                        reg = <31>;
-                       reset-gpios = <&pio 39 0>;
+                       reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
                        interrupt-controller;
                        #interrupt-cells = <1>;
                        interrupt-parent = <&pio>;
index 4eb512f90be727998309fdeb5b589a6ed744b4d7..3c66ac911308be5af0a78a78d037895b9c8ceffd 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/mt65xx.h>
 #include "mt7986a.dtsi"
 
@@ -92,7 +93,7 @@
                compatible = "ethernet-phy-id67c9.de0a";
                reg = <5>;
 
-               reset-gpios = <&pio 6 1>;
+               reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
                reset-deassert-us = <20000>;
        };
 
        switch: switch@1f {
                compatible = "mediatek,mt7531";
                reg = <31>;
-               reset-gpios = <&pio 5 0>;
+               reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
        };
 };
 
index 4680d6ea1455a7c4796f0bde5d3ab36b8111c48a..bb579ec9b6e9569eb6d68003a80db2be13898c64 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 /include/ "octeon_3xxx.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        compatible = "cisco,vedge1000", "cavium,cn6130";
                                reg = <0x00>;
                                voltage-ranges = <0xce4 0xce4>;
                                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>;
                        };
                };