You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
usb: xhci-mtk: make the reference clock optional
Make the reference clock optional for DTS backward compatibility and ignore the error if it does not exist. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca12cb7cb0
commit
f3c4c73704
@@ -559,10 +559,17 @@ static int xhci_mtk_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(mtk->sys_clk);
|
||||
}
|
||||
|
||||
/*
|
||||
* reference clock is usually a "fixed-clock", make it optional
|
||||
* for backward compatibility and ignore the error if it does
|
||||
* not exist.
|
||||
*/
|
||||
mtk->ref_clk = devm_clk_get(dev, "ref_ck");
|
||||
if (IS_ERR(mtk->ref_clk)) {
|
||||
dev_err(dev, "fail to get ref_ck\n");
|
||||
return PTR_ERR(mtk->ref_clk);
|
||||
if (PTR_ERR(mtk->ref_clk) == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
mtk->ref_clk = NULL;
|
||||
}
|
||||
|
||||
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
|
||||
|
||||
Reference in New Issue
Block a user