Skip to content

Commit 59817b9

Browse files
committed
drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
On MSM8960 the HDMI PHY provides the PLL clock to the MMCC. As we are preparing to convert the MSM8960 to use DT clocks properties (rather than global clock names), register the OF clock provider. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/519211/ Link: https://lore.kernel.org/r/20230119132219.2479775-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent a42964c commit 59817b9

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
422422
{
423423
struct device *dev = &pdev->dev;
424424
struct hdmi_pll_8960 *pll;
425-
struct clk *clk;
426-
int i;
425+
int i, ret;
427426

428427
/* sanity check: */
429428
for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++)
@@ -443,10 +442,16 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
443442
pll->pdev = pdev;
444443
pll->clk_hw.init = &pll_init;
445444

446-
clk = devm_clk_register(dev, &pll->clk_hw);
447-
if (IS_ERR(clk)) {
445+
ret = devm_clk_hw_register(dev, &pll->clk_hw);
446+
if (ret < 0) {
448447
DRM_DEV_ERROR(dev, "failed to register pll clock\n");
449-
return -EINVAL;
448+
return ret;
449+
}
450+
451+
ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &pll->clk_hw);
452+
if (ret) {
453+
DRM_DEV_ERROR(dev, "%s: failed to register clk provider: %d\n", __func__, ret);
454+
return ret;
450455
}
451456

452457
return 0;

0 commit comments

Comments
 (0)