All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>, <linux-phy@lists.infradead.org>
Subject: Re: [PATCH v3 2/3] drm/msm/hdmi: make hdmi_phy_8996 OF clk provider
Date: Tue, 23 Aug 2022 18:08:23 -0700	[thread overview]
Message-ID: <31faa17e-b521-9f83-2701-12bf8fd76e4b@quicinc.com> (raw)
In-Reply-To: <20220704161148.814510-3-dmitry.baryshkov@linaro.org>



On 7/4/2022 9:11 AM, Dmitry Baryshkov wrote:
> On MSM8996 the HDMI PHY provides the PLL clock to the MMCC. As we are
> preparing to convert the MSM8996 to use DT clocks properties (rather
> than global clock names), register the OF clock provider.
> 
> While we are at it, also change the driver to use clk_parent_data rather
> parent_names to setup a link to the XO clock.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 25 +++++++++++++-----------
>   1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> index b06d9d25a189..4dd055416620 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> @@ -691,15 +691,13 @@ static const struct clk_ops hdmi_8996_pll_ops = {
>   	.is_enabled = hdmi_8996_pll_is_enabled,
>   };
>   
> -static const char * const hdmi_pll_parents[] = {
> -	"xo",
> -};
> -
>   static const struct clk_init_data pll_init = {
>   	.name = "hdmipll",
>   	.ops = &hdmi_8996_pll_ops,
> -	.parent_names = hdmi_pll_parents,
> -	.num_parents = ARRAY_SIZE(hdmi_pll_parents),
> +	.parent_data = (const struct clk_parent_data[]){
> +		{ .fw_name = "xo", .name = "xo_board" },
> +	},
> +	.num_parents = 1,
>   	.flags = CLK_IGNORE_UNUSED,
>   };
>   
> @@ -707,8 +705,7 @@ int msm_hdmi_pll_8996_init(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct hdmi_pll_8996 *pll;
> -	struct clk *clk;
> -	int i;
> +	int i, ret;
>   
>   	pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
>   	if (!pll)
> @@ -735,10 +732,16 @@ int msm_hdmi_pll_8996_init(struct platform_device *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) {
>   		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;

WARNING: multiple messages have this Message-ID (diff)
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>, <linux-phy@lists.infradead.org>
Subject: Re: [PATCH v3 2/3] drm/msm/hdmi: make hdmi_phy_8996 OF clk provider
Date: Tue, 23 Aug 2022 18:08:23 -0700	[thread overview]
Message-ID: <31faa17e-b521-9f83-2701-12bf8fd76e4b@quicinc.com> (raw)
In-Reply-To: <20220704161148.814510-3-dmitry.baryshkov@linaro.org>



On 7/4/2022 9:11 AM, Dmitry Baryshkov wrote:
> On MSM8996 the HDMI PHY provides the PLL clock to the MMCC. As we are
> preparing to convert the MSM8996 to use DT clocks properties (rather
> than global clock names), register the OF clock provider.
> 
> While we are at it, also change the driver to use clk_parent_data rather
> parent_names to setup a link to the XO clock.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 25 +++++++++++++-----------
>   1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> index b06d9d25a189..4dd055416620 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> @@ -691,15 +691,13 @@ static const struct clk_ops hdmi_8996_pll_ops = {
>   	.is_enabled = hdmi_8996_pll_is_enabled,
>   };
>   
> -static const char * const hdmi_pll_parents[] = {
> -	"xo",
> -};
> -
>   static const struct clk_init_data pll_init = {
>   	.name = "hdmipll",
>   	.ops = &hdmi_8996_pll_ops,
> -	.parent_names = hdmi_pll_parents,
> -	.num_parents = ARRAY_SIZE(hdmi_pll_parents),
> +	.parent_data = (const struct clk_parent_data[]){
> +		{ .fw_name = "xo", .name = "xo_board" },
> +	},
> +	.num_parents = 1,
>   	.flags = CLK_IGNORE_UNUSED,
>   };
>   
> @@ -707,8 +705,7 @@ int msm_hdmi_pll_8996_init(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct hdmi_pll_8996 *pll;
> -	struct clk *clk;
> -	int i;
> +	int i, ret;
>   
>   	pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
>   	if (!pll)
> @@ -735,10 +732,16 @@ int msm_hdmi_pll_8996_init(struct platform_device *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) {
>   		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;

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: devicetree@vger.kernel.org, David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>, Vinod Koul <vkoul@kernel.org>,
	linux-phy@lists.infradead.org,
	Kishon Vijay Abraham I <kishon@ti.com>,
	freedreno@lists.freedesktop.org
Subject: Re: [PATCH v3 2/3] drm/msm/hdmi: make hdmi_phy_8996 OF clk provider
Date: Tue, 23 Aug 2022 18:08:23 -0700	[thread overview]
Message-ID: <31faa17e-b521-9f83-2701-12bf8fd76e4b@quicinc.com> (raw)
In-Reply-To: <20220704161148.814510-3-dmitry.baryshkov@linaro.org>



On 7/4/2022 9:11 AM, Dmitry Baryshkov wrote:
> On MSM8996 the HDMI PHY provides the PLL clock to the MMCC. As we are
> preparing to convert the MSM8996 to use DT clocks properties (rather
> than global clock names), register the OF clock provider.
> 
> While we are at it, also change the driver to use clk_parent_data rather
> parent_names to setup a link to the XO clock.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 25 +++++++++++++-----------
>   1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> index b06d9d25a189..4dd055416620 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
> @@ -691,15 +691,13 @@ static const struct clk_ops hdmi_8996_pll_ops = {
>   	.is_enabled = hdmi_8996_pll_is_enabled,
>   };
>   
> -static const char * const hdmi_pll_parents[] = {
> -	"xo",
> -};
> -
>   static const struct clk_init_data pll_init = {
>   	.name = "hdmipll",
>   	.ops = &hdmi_8996_pll_ops,
> -	.parent_names = hdmi_pll_parents,
> -	.num_parents = ARRAY_SIZE(hdmi_pll_parents),
> +	.parent_data = (const struct clk_parent_data[]){
> +		{ .fw_name = "xo", .name = "xo_board" },
> +	},
> +	.num_parents = 1,
>   	.flags = CLK_IGNORE_UNUSED,
>   };
>   
> @@ -707,8 +705,7 @@ int msm_hdmi_pll_8996_init(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct hdmi_pll_8996 *pll;
> -	struct clk *clk;
> -	int i;
> +	int i, ret;
>   
>   	pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
>   	if (!pll)
> @@ -735,10 +732,16 @@ int msm_hdmi_pll_8996_init(struct platform_device *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) {
>   		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;

  reply	other threads:[~2022-08-24  1:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 16:11 [PATCH v3 0/3] drm/msm/hdmi: turn MSM8996 HDMI PHY into OF clock provider Dmitry Baryshkov
2022-07-04 16:11 ` Dmitry Baryshkov
2022-07-04 16:11 ` Dmitry Baryshkov
2022-07-04 16:11 ` [PATCH v3 1/3] dt-bindings: phy: qcom,hdmi-phy-qmp: add clock-cells and XO clock Dmitry Baryshkov
2022-07-04 16:11   ` [PATCH v3 1/3] dt-bindings: phy: qcom, hdmi-phy-qmp: " Dmitry Baryshkov
2022-07-04 16:11   ` [PATCH v3 1/3] dt-bindings: phy: qcom,hdmi-phy-qmp: " Dmitry Baryshkov
2022-07-05  5:19   ` Vinod Koul
2022-07-05  5:19     ` Vinod Koul
2022-07-05  5:19     ` Vinod Koul
2022-07-04 16:11 ` [PATCH v3 2/3] drm/msm/hdmi: make hdmi_phy_8996 OF clk provider Dmitry Baryshkov
2022-07-04 16:11   ` Dmitry Baryshkov
2022-07-04 16:11   ` Dmitry Baryshkov
2022-08-24  1:08   ` Abhinav Kumar [this message]
2022-08-24  1:08     ` Abhinav Kumar
2022-08-24  1:08     ` Abhinav Kumar
2022-07-04 16:11 ` [PATCH v3 3/3] arm64: dts: qcom: msm8996: add #clock-cells and XO clock to the HDMI PHY node Dmitry Baryshkov
2022-07-04 16:11   ` Dmitry Baryshkov
2022-07-04 16:11   ` Dmitry Baryshkov
2022-08-26 14:25   ` Dmitry Baryshkov
2022-08-26 14:25     ` Dmitry Baryshkov
2022-08-26 14:25     ` Dmitry Baryshkov
2022-09-09 10:18     ` Dmitry Baryshkov
2022-09-09 10:18       ` Dmitry Baryshkov
2022-09-09 10:18       ` Dmitry Baryshkov
2022-09-15  3:36 ` (subset) [PATCH v3 0/3] drm/msm/hdmi: turn MSM8996 HDMI PHY into OF clock provider Bjorn Andersson
2022-09-15  3:36   ` Bjorn Andersson
2022-09-15  3:36   ` Bjorn Andersson

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=31faa17e-b521-9f83-2701-12bf8fd76e4b@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=agross@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.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=kishon@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.