From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider
Date: Thu, 19 Jan 2023 15:01:55 +0100 [thread overview]
Message-ID: <efd3d3df-4d0e-8cd4-24f5-11aeb4682948@linaro.org> (raw)
In-Reply-To: <20230119132219.2479775-5-dmitry.baryshkov@linaro.org>
On 19.01.2023 14:22, Dmitry Baryshkov wrote:
> 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>
Konrad
> 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;
next prev parent reply other threads:[~2023-01-19 14:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 13:22 [PATCH 0/6] drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure Dmitry Baryshkov
2023-01-19 13:22 ` [PATCH 1/6] dt-bindings: phy: qcom,hdmi-phy-other: use pxo clock Dmitry Baryshkov
2023-01-26 11:20 ` Krzysztof Kozlowski
2023-01-19 13:22 ` [PATCH 2/6] dt-bindings: phy: qcom,hdmi-phy-other: mark it as clock provider Dmitry Baryshkov
2023-01-23 21:22 ` Rob Herring
2023-01-19 13:22 ` [PATCH 3/6] drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Dmitry Baryshkov
2023-01-19 13:58 ` Konrad Dybcio
2023-01-19 13:22 ` [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider Dmitry Baryshkov
2023-01-19 14:01 ` Konrad Dybcio [this message]
2023-01-19 13:22 ` [PATCH 5/6] ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Dmitry Baryshkov
2023-01-19 13:22 ` [PATCH 6/6] ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Dmitry Baryshkov
2023-01-19 14:12 ` Konrad Dybcio
2023-01-26 19:00 ` [PATCH 0/6] drm/msm/hdmi: integrate msm8960 HDMI PHY with DT clocks infrastructure Dmitry Baryshkov
2023-02-09 4:22 ` (subset) " Bjorn Andersson
-- strict thread matches above, loose matches on Subject: below --
2022-09-09 13:20 [PATCH 0/6] drm/msm/hdmi: update hdmi_pll_8960 driver Dmitry Baryshkov
2022-09-09 13:20 ` [PATCH 4/6] drm/msm/hdmi: make hdmi_phy_8960 OF clk provider Dmitry Baryshkov
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=efd3d3df-4d0e-8cd4-24f5-11aeb4682948@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sean@poorly.run \
--cc=swboyd@chromium.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;
as well as URLs for NNTP newsgroup(s).