From: Chunfeng Yun Date: Tue, 11 Feb 2020 03:21:13 +0000 (+0800) Subject: phy: phy-mtk-tphy: make the ref clock optional X-Git-Tag: v5.10.7~2992^2~13^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=657a9edec0757cc6841672fda8065b2338c6b073;p=platform%2Fkernel%2Flinux-rpi.git phy: phy-mtk-tphy: make the ref clock optional 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 Signed-off-by: Kishon Vijay Abraham I --- diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 4a2dc92..96c62e3 100644 --- a/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c @@ -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);