From: Jagadeesh Kona <quic_jkona@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Ajit Pandey <quic_ajipan@quicinc.com>,
Imran Shaik <quic_imrashai@quicinc.com>,
"Taniya Das" <quic_tdas@quicinc.com>,
Satya Priya Kakitapalli <quic_skakitap@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] clk: qcom: common: Attach clock power domains conditionally
Date: Thu, 20 Feb 2025 12:43:42 +0530 [thread overview]
Message-ID: <bf217f30-967c-4ffb-a3ee-f47e8ee97ad4@quicinc.com> (raw)
In-Reply-To: <fvcmc3ibqcwzokvqomntxn2vkgduvbdsx3gd5vkctzwrik7bis@iyjrejmqkpfp>
On 2/19/2025 5:27 PM, Dmitry Baryshkov wrote:
> On Wed, Feb 19, 2025 at 05:06:11PM +0530, Jagadeesh Kona wrote:
>>
>>
>> On 2/18/2025 10:48 PM, Dmitry Baryshkov wrote:
>>> On Tue, Feb 18, 2025 at 07:56:48PM +0530, Jagadeesh Kona wrote:
>>>> Attach clock power domains in qcom_cc_really_probe() only
>>>> if the clock controller has not already attached to them.
>>>
>>> Squash this to the previous patch and call the new function. No need to
>>> duplicate the code.
>>>
>>
>> I tried calling the new function here instead of duplicating code, but that
>> is leading to below warning since the desc passed to qcom_cc_really_probe()
>> has a const qualifier and hence we cannot update desc->pd_list inside
>> qcom_cc_really_probe().
>>
>> drivers/clk/qcom/common.c:305:33: WARNING : passing argument 2 of ‘qcom_cc_attach_pds’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> It sounds like this can be fixed with a one-line patch.
>
Removing const qualifier to qcom_cc_really_probe() will fix this, but that requires changes in
many other drivers which are currently passing const descriptor to it.
But I can squash this to my previous patch by updating my qcom_cc_attach_pds() function
prototype as below and then calling that new function here
-int qcom_cc_attach_pds(struct device *dev, struct qcom_cc_desc *desc)
+int qcom_cc_attach_pds(struct device *dev, struct dev_pm_domain_list *pd_list)
- ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
- if (ret < 0 && ret != -EEXIST)
+ ret = qcom_cc_attach_pds(dev, cc->pd_list);
+ if (ret)
Thanks,
Jagadeesh
>>
>> Thanks,
>> Jagadeesh
>>
>>>>
>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>>>> ---
>>>> drivers/clk/qcom/common.c | 9 ++++++---
>>>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
>>>> index ec27f70b24bdec24edd2f6b3df0d766fc1cdcbf0..eb7e2a56d1d135f839fd9bd470ba6231ce775a8c 100644
>>>> --- a/drivers/clk/qcom/common.c
>>>> +++ b/drivers/clk/qcom/common.c
>>>> @@ -300,9 +300,12 @@ int qcom_cc_really_probe(struct device *dev,
>>>> if (!cc)
>>>> return -ENOMEM;
>>>>
>>>> - ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
>>>> - if (ret < 0 && ret != -EEXIST)
>>>> - return ret;
>>>> + cc->pd_list = desc->pd_list;
>>>> + if (!cc->pd_list) {
>>>> + ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
>>>> + if (ret < 0 && ret != -EEXIST)
>>>> + return ret;
>>>> + }
>>>>
>>>> reset = &cc->reset;
>>>> reset->rcdev.of_node = dev->of_node;
>>>>
>>>> --
>>>> 2.34.1
>>>>
>>>
>
next prev parent reply other threads:[~2025-02-20 7:13 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 14:26 [PATCH 0/5] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
2025-02-18 14:26 ` [PATCH 1/5] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
2025-02-18 15:49 ` Bryan O'Donoghue
2025-02-21 20:54 ` Rob Herring (Arm)
2025-02-18 14:26 ` [PATCH 2/5] clk: qcom: common: Add support to attach multiple power domains Jagadeesh Kona
2025-02-18 14:26 ` [PATCH 3/5] clk: qcom: common: Attach clock power domains conditionally Jagadeesh Kona
2025-02-18 17:18 ` Dmitry Baryshkov
2025-02-19 11:36 ` Jagadeesh Kona
2025-02-19 11:57 ` Dmitry Baryshkov
2025-02-20 7:13 ` Jagadeesh Kona [this message]
2025-02-20 10:48 ` Dmitry Baryshkov
2025-02-21 11:42 ` Jagadeesh Kona
2025-02-21 13:35 ` Dmitry Baryshkov
2025-02-18 14:26 ` [PATCH 4/5] clk: qcom: videocc: Add support to attach multiple power domains Jagadeesh Kona
2025-02-18 15:46 ` Bryan O'Donoghue
2025-02-18 16:44 ` Bryan O'Donoghue
2025-02-18 17:19 ` Dmitry Baryshkov
2025-02-19 1:21 ` Bryan O'Donoghue
2025-02-19 11:41 ` Jagadeesh Kona
2025-02-19 11:59 ` Dmitry Baryshkov
2025-02-19 12:07 ` Bryan O'Donoghue
2025-02-20 7:15 ` Jagadeesh Kona
2025-02-20 10:21 ` Bryan O'Donoghue
2025-02-20 22:31 ` Bryan O'Donoghue
2025-02-20 22:34 ` Bryan O'Donoghue
2025-02-21 0:10 ` Dmitry Baryshkov
2025-02-21 9:42 ` Bryan O'Donoghue
2025-02-21 11:43 ` Jagadeesh Kona
2025-02-21 12:32 ` Bryan O'Donoghue
2025-02-24 6:37 ` Jagadeesh Kona
2025-02-19 11:38 ` Jagadeesh Kona
2025-02-19 12:02 ` Dmitry Baryshkov
2025-02-20 7:13 ` Jagadeesh Kona
2025-02-21 19:19 ` Konrad Dybcio
2025-02-24 6:37 ` Jagadeesh Kona
2025-02-18 14:26 ` [PATCH 5/5] arm64: dts: qcom: Add MXC power domain to videocc nodes Jagadeesh Kona
2025-02-18 15:41 ` Bryan O'Donoghue
2025-02-18 17:32 ` Dmitry Baryshkov
2025-02-20 7:08 ` Jagadeesh Kona
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=bf217f30-967c-4ffb-a3ee-f47e8ee97ad4@quicinc.com \
--to=quic_jkona@quicinc.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_ajipan@quicinc.com \
--cc=quic_imrashai@quicinc.com \
--cc=quic_skakitap@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=robh@kernel.org \
--cc=sboyd@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
all inboxes | Powered by JetHome®