The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: qcom: enable ALWAYS_ON for titan_top_gdsc
Date: Mon, 29 Jun 2026 11:27:19 -0400	[thread overview]
Message-ID: <akKO16q4rTbS2vx7@redhat.com> (raw)
In-Reply-To: <03596c5b-9448-49e3-a035-25c0475df9be@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

Hi Vladimir,

On Mon, Jun 29, 2026 at 04:00:46PM +0300, Vladimir Zapolskiy wrote:
> commenting the series I was also directed by Konrad's review comment on it.
> In addition one problem, which I immediate observe, is that camcc_sc8280xp_desc
> misses the necessary .use_rpm flag, can you please do me a favour and test
> my series plus the add-on change below?
> 
> diff --git a/drivers/clk/qcom/camcc-sc8280xp.c b/drivers/clk/qcom/camcc-sc8280xp.c
> index 18f5a3eb313e..a15e9754bfb2 100644
> --- a/drivers/clk/qcom/camcc-sc8280xp.c
> +++ b/drivers/clk/qcom/camcc-sc8280xp.c
> @@ -2995,6 +2995,8 @@ static const struct qcom_cc_desc camcc_sc8280xp_desc = {
>  	.num_resets = ARRAY_SIZE(camcc_sc8280xp_resets),
>  	.gdscs = camcc_sc8280xp_gdscs,
>  	.num_gdscs = ARRAY_SIZE(camcc_sc8280xp_gdscs),
> +	.use_rpm = true,
> +	.cc_gdsc = &titan_top_gdsc,
>  };
>  static const struct of_device_id camcc_sc8280xp_match_table[] = {

I tried with this initially, however it fails with:

[    8.193803] camcc-sc8280xp ad00000.clock-controller: Unbalanced pm_runtime_enable!

I see that pm_runtime_enable() is called from common.c when use_rpm is
enabled. So I removed all of that from camcc-sc8280xp.c with the
attached patch.

It still fails with:

[    8.204595] camcc-sc8280xp ad00000.clock-controller: probe with driver camcc-sc8280xp failed with error -22

I suspect the use_rpm flag requires a more thorough migration.

Brian

[-- Attachment #2: camcc-sc8280xp.patch --]
[-- Type: text/plain, Size: 1647 bytes --]

diff --git a/drivers/clk/qcom/camcc-sc8280xp.c b/drivers/clk/qcom/camcc-sc8280xp.c
index 18f5a3eb313e1..a7d2a86ddaa36 100644
--- a/drivers/clk/qcom/camcc-sc8280xp.c
+++ b/drivers/clk/qcom/camcc-sc8280xp.c
@@ -8,7 +8,6 @@
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 
 #include <dt-bindings/clock/qcom,sc8280xp-camcc.h>
@@ -2995,6 +2994,8 @@ static const struct qcom_cc_desc camcc_sc8280xp_desc = {
 	.num_resets = ARRAY_SIZE(camcc_sc8280xp_resets),
 	.gdscs = camcc_sc8280xp_gdscs,
 	.num_gdscs = ARRAY_SIZE(camcc_sc8280xp_gdscs),
+	.use_rpm = true,
+	.cc_gdsc = &titan_top_gdsc,
 };
 
 static const struct of_device_id camcc_sc8280xp_match_table[] = {
@@ -3008,19 +3009,9 @@ static int camcc_sc8280xp_probe(struct platform_device *pdev)
 	struct regmap *regmap;
 	int ret;
 
-	ret = devm_pm_runtime_enable(&pdev->dev);
-	if (ret)
-		return ret;
-
-	ret = pm_runtime_resume_and_get(&pdev->dev);
-	if (ret)
-		return ret;
-
 	regmap = qcom_cc_map(pdev, &camcc_sc8280xp_desc);
-	if (IS_ERR(regmap)) {
-		ret = PTR_ERR(regmap);
-		goto err_put_rpm;
-	}
+	if (IS_ERR(regmap))
+		return PTR_ERR(regmap);
 
 	clk_lucid_pll_configure(&camcc_pll0, regmap, &camcc_pll0_config);
 	clk_lucid_pll_configure(&camcc_pll1, regmap, &camcc_pll1_config);
@@ -3038,14 +3029,10 @@ static int camcc_sc8280xp_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_disable;
 
-	pm_runtime_put(&pdev->dev);
-
 	return 0;
 
 err_disable:
 	regmap_update_bits(regmap, 0xc1e4, BIT(0), 0);
-err_put_rpm:
-	pm_runtime_put_sync(&pdev->dev);
 
 	return ret;
 }

  reply	other threads:[~2026-06-29 15:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 16:26 [PATCH] clk: qcom: enable ALWAYS_ON for titan_top_gdsc Brian Masney
2026-06-26 16:32 ` Konrad Dybcio
2026-06-26 16:54   ` Vladimir Zapolskiy
2026-06-29 11:03     ` Brian Masney
2026-06-29 13:00       ` Vladimir Zapolskiy
2026-06-29 15:27         ` Brian Masney [this message]
2026-06-29 16:29           ` Vladimir Zapolskiy
2026-07-01  4:07   ` Jagadeesh Kona
2026-06-26 16:59 ` Vladimir Zapolskiy
2026-06-29 11:07   ` Brian Masney
     [not found] ` <556dc88a-42c0-4d5a-8a37-bc4959d72ffa@linaro.org>
2026-06-29 11:01   ` Brian Masney

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=akKO16q4rTbS2vx7@redhat.com \
    --to=bmasney@redhat.com \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=vladimir.zapolskiy@linaro.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