]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select"
authorVidya Sagar <vidyas@nvidia.com>
Tue, 24 Mar 2026 19:07:47 +0000 (00:37 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Apr 2026 21:58:14 +0000 (16:58 -0500)
The GPIO DT property "nvidia,refclk-select", to select the PCIe reference
clock is optional. Use devm_gpiod_get_optional() to get it.

Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Link: https://patch.msgid.link/20260324190755.1094879-7-mmaddireddy@nvidia.com
drivers/pci/controller/dwc/pcie-tegra194.c

index ceb34110a50b3ca0a142c3520db09006778b67d5..71b80edd10c8cc07ed46869ca52070aaecd62339 100644 (file)
@@ -1167,9 +1167,9 @@ static int tegra_pcie_dw_parse_dt(struct tegra_pcie_dw *pcie)
                return err;
        }
 
-       pcie->pex_refclk_sel_gpiod = devm_gpiod_get(pcie->dev,
-                                                   "nvidia,refclk-select",
-                                                   GPIOD_OUT_HIGH);
+       pcie->pex_refclk_sel_gpiod = devm_gpiod_get_optional(pcie->dev,
+                                                            "nvidia,refclk-select",
+                                                            GPIOD_OUT_HIGH);
        if (IS_ERR(pcie->pex_refclk_sel_gpiod)) {
                int err = PTR_ERR(pcie->pex_refclk_sel_gpiod);
                const char *level = KERN_ERR;