From 9358936fa13a8d7d9fbe92762ab38271c8dcb7c0 Mon Sep 17 00:00:00 2001 From: Sing-Han Chen Date: Thu, 3 Sep 2026 15:19:35 +0800 Subject: [PATCH] phy: tegra: xusb: Use devm_clk_get_optional to fetch USB2 tracking clock The USB2 PAD tracking clock is an optional clock so use devm_clk_get_optional() so a missing clock in devicetree is represented as NULL and probe can continue. clk_prepare_enable() and clk_disable_unprepare() already treat a NULL clock as a no-op. Signed-off-by: Sing-Han Chen Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Tested-by: Jon Hunter Link: https://patch.msgid.link/20260903071937.533646-3-waynec@nvidia.com Signed-off-by: Vinod Koul --- drivers/phy/tegra/xusb-tegra186.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index 60156aea2707..800be0cbb3f9 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -1045,7 +1045,7 @@ tegra186_usb2_pad_probe(struct tegra_xusb_padctl *padctl, goto out; } - priv->usb2_trk_clk = devm_clk_get(&pad->dev, "trk"); + priv->usb2_trk_clk = devm_clk_get_optional(&pad->dev, "trk"); if (IS_ERR(priv->usb2_trk_clk)) { err = PTR_ERR(priv->usb2_trk_clk); dev_dbg(&pad->dev, "failed to get usb2 trk clock: %d\n", err);