phy: phy-mtk-tphy: make the ref clock optional
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 11 Feb 2020 03:21:13 +0000 (11:21 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 20 Mar 2020 14:04:29 +0000 (19:34 +0530)
Sometimes the reference clock of USB3 PHY comes from oscillator
directly, and no need refer to a fixed-clock in DTS anymore
if make it optional.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c

index 4a2dc92..96c62e3 100644 (file)
@@ -1182,7 +1182,7 @@ static int mtk_tphy_probe(struct platform_device *pdev)
                if (tphy->u3phya_ref)
                        continue;
 
-               instance->ref_clk = devm_clk_get(&phy->dev, "ref");
+               instance->ref_clk = devm_clk_get_optional(&phy->dev, "ref");
                if (IS_ERR(instance->ref_clk)) {
                        dev_err(dev, "failed to get ref_clk(id-%d)\n", port);
                        retval = PTR_ERR(instance->ref_clk);