diff mbox series

[v1,2/2] PCI: j721e: Fix PERST# polarity

Message ID 20240703100036.17896-3-francesco@dolcini.it (mailing list archive)
State New
Delegated to: Krzysztof WilczyƄski
Headers show
Series PCI: ti: k3: Fix TI J721E PERST# polarity | expand

Commit Message

Francesco Dolcini July 3, 2024, 10 a.m. UTC
From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>

Now that PERST# is properly defined as active-low in the device tree,
fix the driver to correctly drive the line independently of the implied
polarity.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
 drivers/pci/controller/cadence/pci-j721e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index 85718246016b..4d7e1104de1f 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -503,7 +503,7 @@  static int j721e_pcie_probe(struct platform_device *pdev)
 
 	switch (mode) {
 	case PCI_MODE_RC:
-		gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
+		gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
 		if (IS_ERR(gpiod)) {
 			ret = PTR_ERR(gpiod);
 			if (ret != -EPROBE_DEFER)
@@ -541,7 +541,7 @@  static int j721e_pcie_probe(struct platform_device *pdev)
 		 */
 		if (gpiod) {
 			usleep_range(100, 200);
-			gpiod_set_value_cansleep(gpiod, 1);
+			gpiod_set_value_cansleep(gpiod, 0);
 		}
 
 		ret = cdns_pcie_host_setup(rc);