Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dmitry Baryshkov and committed by
Vinod Koul
101097d6 a98f5cc9

+5 -1
+5 -1
drivers/phy/qualcomm/phy-qcom-pcie2.c
··· 243 243 fixed->fixed_rate = 250000000; 244 244 fixed->hw.init = &init; 245 245 246 - return devm_clk_hw_register(qphy->dev, &fixed->hw); 246 + ret = devm_clk_hw_register(qphy->dev, &fixed->hw); 247 + if (ret < 0) 248 + return ret; 249 + 250 + return devm_of_clk_add_hw_provider(qphy->dev, of_clk_hw_simple_get, &fixed->hw); 247 251 } 248 252 249 253 static int qcom_pcie2_phy_probe(struct platform_device *pdev)