diff mbox series

[v2,7/7] phy: phy-mtk-tphy: make ref clock optional

Message ID 1578540910-3516-7-git-send-email-chunfeng.yun@mediatek.com
State Accepted
Commit ce0069ed9599d6e42f89b272f618c305fad039e3
Headers show
Series [v2,1/7] clk: mediatek: mt7629: add support for ssusbsys | expand

Commit Message

Chunfeng Yun (云春峰) Jan. 9, 2020, 3:35 a.m. UTC
If make the ref clock optional, no need refer to fixed-clock when
the ref clock is always on or comes from oscillator directly.

Signed-off-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Ryder Lee <ryder.lee at mediatek.com>
---
v2: add reviewed-by Simon & Ryder
---
 drivers/phy/phy-mtk-tphy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini Jan. 16, 2020, 2:42 p.m. UTC | #1
On Thu, Jan 09, 2020 at 11:35:10AM +0800, Chunfeng Yun wrote:

> If make the ref clock optional, no need refer to fixed-clock when
> the ref clock is always on or comes from oscillator directly.
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Ryder Lee <ryder.lee at mediatek.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index c4fb404f20..fd33062ae4 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -338,7 +338,8 @@  static int mtk_tphy_probe(struct udevice *dev)
 		tphy->phys[index] = instance;
 		index++;
 
-		err = clk_get_by_index_nodev(subnode, 0, &instance->ref_clk);
+		err = clk_get_optional_nodev(subnode, "ref",
+					     &instance->ref_clk);
 		if (err)
 			return err;
 	}