From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
Vinod Koul <vkoul@kernel.org>,
linux-phy@lists.infradead.org,
Kishon Vijay Abraham I <kishon@ti.com>
Subject: [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
Date: Fri, 9 Sep 2022 16:20:08 +0300 [thread overview]
Message-ID: <20220909132010.3814817-5-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20220909132010.3814817-1-dmitry.baryshkov@linaro.org>
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>
---
drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
index c3e7ff45e52a..cb35a297afbd 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
@@ -422,8 +422,7 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct hdmi_pll_8960 *pll;
- struct clk *clk;
- int i;
+ int i, ret;
/* sanity check: */
for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++)
@@ -443,10 +442,16 @@ int msm_hdmi_pll_8960_init(struct platform_device *pdev)
pll->pdev = pdev;
pll->clk_hw.init = &pll_init;
- clk = devm_clk_register(dev, &pll->clk_hw);
- if (IS_ERR(clk)) {
+ ret = devm_clk_hw_register(dev, &pll->clk_hw);
+ if (ret < 0) {
DRM_DEV_ERROR(dev, "failed to register pll clock\n");
- return -EINVAL;
+ return ret;
+ }
+
+ ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &pll->clk_hw);
+ if (ret) {
+ DRM_DEV_ERROR(dev, "%s: failed to register clk provider: %d\n", __func__, ret);
+ return ret;
}
return 0;
--
2.35.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2022-09-09 13:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
2022-09-09 13:20 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
2022-09-09 13:30 ` Krzysztof Kozlowski
2022-09-09 15:03 ` Dmitry Baryshkov
2022-09-09 16:44 ` Krzysztof Kozlowski
2022-09-09 20:29 ` Dmitry Baryshkov
2022-09-10 7:53 ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
2022-09-09 13:31 ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Dmitry Baryshkov
2022-09-09 13:20 ` Dmitry Baryshkov [this message]
2022-09-09 13:20 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
2022-09-09 13:31 ` Krzysztof Kozlowski
2022-09-09 13:20 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
2022-09-09 13:31 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220909132010.3814817-5-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox