summaryrefslogtreecommitdiff
path: root/drivers/phy/qualcomm/phy-qcom-pcie2.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2022-12-29 13:59:32 +0200
committerVinod Koul <vkoul@kernel.org>2023-01-12 22:44:29 +0530
commit101097d69ec1db556c002d7cbe68ae2fe1dc3ded (patch)
tree51c568371d0960cfa738d22cc442287d8c3f6bab /drivers/phy/qualcomm/phy-qcom-pcie2.c
parenta98f5cc9c0e01186244498a084bf24ae764f86f2 (diff)
phy: qualcomm: pcie2: register as clock provider
Register pcie2 PHY as a clock provider to enable using it in the DT-based clock lookup. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20221229115932.3312318-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/qualcomm/phy-qcom-pcie2.c')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-pcie2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-pcie2.c b/drivers/phy/qualcomm/phy-qcom-pcie2.c
index 5407e59bb185..11a2bb958681 100644
--- a/drivers/phy/qualcomm/phy-qcom-pcie2.c
+++ b/drivers/phy/qualcomm/phy-qcom-pcie2.c
@@ -243,7 +243,11 @@ static int phy_pipe_clksrc_register(struct qcom_phy *qphy)
fixed->fixed_rate = 250000000;
fixed->hw.init = &init;
- return devm_clk_hw_register(qphy->dev, &fixed->hw);
+ ret = devm_clk_hw_register(qphy->dev, &fixed->hw);
+ if (ret < 0)
+ return ret;
+
+ return devm_of_clk_add_hw_provider(qphy->dev, of_clk_hw_simple_get, &fixed->hw);
}
static int qcom_pcie2_phy_probe(struct platform_device *pdev)