Re: [PATCH v6 05/13] PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select"

From: Vidya Sagar

Date: Fri Feb 27 2026 - 07:46:58 EST


On 24/02/26 00:11, Manikanta Maddireddy wrote:
> From: Vidya Sagar <vidyas@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Manikanta Maddireddy <mmaddireddy@xxxxxxxxxx>
> ---
> Changes V5 -> V6: None
> Changes V4 -> V5: Added Fixes tag
> Changes V1 -> V4: None
>
> drivers/pci/controller/dwc/pcie-tegra194.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 9455456028bc..8f69c5c5a099 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1170,9 +1170,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;

Reviewed-by: Vidya Sagar <vidyas@xxxxxxxxxx>