summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorLiu Ying <victor.liu@nxp.com>2017-10-13 11:47:51 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitbc5f6f42005c2de2b66f03208314e43cb6d75e04 (patch)
tree5137bcc117644c4764e4462527af9aa6ac5ab651 /drivers/phy
parent9629389ddc91a348f632e9687b42c3600e9a0f68 (diff)
MLK-16581-2 phy: mixel-lvds-combo: Get PHY clock rate before setting it's rate
Due to i.MX8 clock issue, we need to get PHY clock rate before setting it's rate when system resumes back from PM sleep mode, otherwise, we'll fail to set the clock rate. So, this is a workaround and it can be removed when the clock issue is properly fixed. Signed-off-by: Liu Ying <victor.liu@nxp.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-mixel-lvds-combo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/phy/phy-mixel-lvds-combo.c b/drivers/phy/phy-mixel-lvds-combo.c
index 9d3d46987290..3b888b110e0d 100644
--- a/drivers/phy/phy-mixel-lvds-combo.c
+++ b/drivers/phy/phy-mixel-lvds-combo.c
@@ -96,6 +96,13 @@ void mixel_phy_combo_lvds_set_phy_speed(struct phy *phy,
{
struct mixel_lvds_phy *lvds_phy = phy_get_drvdata(phy);
+ /*
+ * To workaround setting clock rate failure issue
+ * when the system resumes back from PM sleep mode,
+ * we need to get the clock rate before setting it's
+ * rate, otherwise, setting the clock rate will fail.
+ */
+ clk_get_rate(lvds_phy->phy_clk);
clk_set_rate(lvds_phy->phy_clk, phy_clk_rate);
}
EXPORT_SYMBOL_GPL(mixel_phy_combo_lvds_set_phy_speed);