[PATCH v1 2/2] PCI: j721e: Fix PERST# polarity
Francesco Dolcini
francesco at dolcini.it
Wed Jul 3 03:00:36 PDT 2024
From: Emanuele Ghidoli <emanuele.ghidoli at 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 at toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
---
drivers/pci/controller/cadence/pci-j721e.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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);
--
2.39.2
More information about the linux-arm-kernel
mailing list