ramips: fix polarity in gpio-export node

If we need to set the initial output value to GPIOF_OUT_INIT_HIGH (1) to
enable something, the pin is ACTIVE_HIGH. The same applies to
GPIOF_OUT_INIT_LOW (0) and ACTIVE_LOW.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin 2017-12-17 00:02:06 +01:00
parent 7c03f97e84
commit 95fe3c51e5
11 changed files with 11 additions and 16 deletions

View file

@ -92,7 +92,7 @@
power_usb { power_usb {
gpio-export,name = "power_usb1"; gpio-export,name = "power_usb1";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
}; };
}; };

View file

@ -103,7 +103,7 @@
usb { usb {
gpio-export,name="usb"; gpio-export,name="usb";
gpio-export,output=<0>; gpio-export,output=<0>;
gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
}; };
}; };
*/ */

View file

@ -68,7 +68,7 @@
modem3g_enable { modem3g_enable {
gpio-export,name = "modem3g_enable"; gpio-export,name = "modem3g_enable";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
}; };
}; };
}; };

View file

@ -64,7 +64,7 @@
usb { usb {
gpio-export,name = "usb"; gpio-export,name = "usb";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
}; };
}; };

View file

@ -42,13 +42,13 @@
usbpower { usbpower {
gpio-export,name = "usbpower"; gpio-export,name = "usbpower";
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
}; };
sdpower { sdpower {
gpio-export,name = "sdpower"; gpio-export,name = "sdpower";
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
}; };
}; };
}; };

View file

@ -72,7 +72,7 @@
display_data { display_data {
gpio-export,name = "display_data"; gpio-export,name = "display_data";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
}; };
display_clock { display_clock {

View file

@ -79,7 +79,7 @@
usbpower { usbpower {
gpio-export,name = "usbpower"; gpio-export,name = "usbpower";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
}; };
}; };
}; };

View file

@ -13,11 +13,6 @@
bootargs = "console=ttyS1,115200"; bootargs = "console=ttyS1,115200";
}; };
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
};
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";

View file

@ -64,7 +64,7 @@
usbpower { usbpower {
gpio-export,name = "usbpower"; gpio-export,name = "usbpower";
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
}; };
}; };
}; };

View file

@ -85,7 +85,7 @@
usb { usb {
gpio-export,name = "usb"; gpio-export,name = "usb";
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
}; };
}; };
}; };

View file

@ -66,7 +66,7 @@
usb-mode { usb-mode {
gpio-export,name = "usb-mode"; gpio-export,name = "usb-mode";
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
}; };
}; };
}; };