]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
gpiolib: of: add polarity quirk for Freescale PCIe controller
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 30 Oct 2022 04:40:47 +0000 (21:40 -0700)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Nov 2022 15:15:09 +0000 (16:15 +0100)
Bindings for Freescale PCIe controller use a separate property called
"reset-gpio-active-high" to control polarity of its reset line, add it
to the list of quirks in gpiolib so that gpiod API can be used in the
driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-of.c

index e72b56a87b86cbef6cb29ba5410f31bd509d567d..be9c34cca32256ca45f1854f6cbe369c0fd386a7 100644 (file)
@@ -208,6 +208,15 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np,
                { "fsl,imx8qm-fec",  "phy-reset-gpios", "phy-reset-active-high" },
                { "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" },
 #endif
+#if IS_ENABLED(CONFIG_PCI_IMX6)
+               { "fsl,imx6q-pcie",  "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx6sx-pcie", "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx6qp-pcie", "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx7d-pcie",  "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx8mq-pcie", "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx8mm-pcie", "reset-gpio", "reset-gpio-active-high" },
+               { "fsl,imx8mp-pcie", "reset-gpio", "reset-gpio-active-high" },
+#endif
 
                /*
                 * The regulator GPIO handles are specified such that the