Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sarath Ganapathiraju" <sarath.ganapathiraju@oss.qualcomm.com>
Cc: conor+dt@kernel.org, linux-clk@vger.kernel.org, robh@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v9 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
Date: Mon, 28 Sep 2026 16:08:10 +0000	[thread overview]
Message-ID: <20260928160811.553C81F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260928-master-v9-2-2277f09f9a09@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] clk: qcom: missing .is_enabled in gate clock ops causes power leak
--

commit cd2f6ce18faa02e554ea7e8ca64e0b68dfbbbc9a
Author: Sarath Ganapathiraju <sarath.ganapathiraju@oss.qualcomm.com>

clk: qcom: Add LPASS VA CSR heartbeat pulse clock

This commit adds the LPASS VA CSR driver to model the rate generator as
a clock provider. It allows consumers to enable and disable it through
the common clock framework and attaches the DT vote clocks to runtime PM.

> diff --git a/drivers/clk/qcom/lpass-va-csr.c b/drivers/clk/qcom/lpass-va-csr.c
> new file mode 100644
> index 0000000000000..93eafb2e043ab
> --- /dev/null
> +++ b/drivers/clk/qcom/lpass-va-csr.c
[ ... ]
> +static const struct clk_ops lpass_va_csr_hb_ops = {
> +	.prepare = lpass_va_csr_hb_prepare,
> +	.unprepare = lpass_va_csr_hb_unprepare,
> +	.enable = clk_enable_regmap,
> +	.disable = clk_disable_regmap,
> +};

[Severity: Medium]
Is the .is_enabled callback missing from lpass_va_csr_hb_ops?

The Common Clock Framework explicitly requires the .is_enabled callback for
gate clocks to accurately read the initial hardware state (as documented in
clk_core_is_enabled()). Without this callback, CCF falls back to the software
enable_count, which is 0 at boot.

If the bootloader or previous firmware left the LPASS rate generator enabled,
clk_disable_unused() will assume it is already disabled and skip it, leading
to a persistent power leak.

Could .is_enabled = clk_is_enabled_regmap be added here to ensure the unused
clock can be properly evaluated and disabled?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260928-master-v9-0-2277f09f9a09@oss.qualcomm.com?part=2

      reply	other threads:[~2026-09-28 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 15:57 [PATCH v9 0/2] Add LPASS VA CSR HeartBeat pulse clock support Sarath Ganapathiraju via B4 Relay
2026-09-28 15:57 ` [PATCH v9 1/2] dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock Sarath Ganapathiraju via B4 Relay
2026-09-28 21:13   ` Rob Herring (Arm)
2026-09-28 15:57 ` [PATCH v9 2/2] clk: qcom: Add LPASS VA CSR heartbeat " Sarath Ganapathiraju via B4 Relay
2026-09-28 16:08   ` sashiko-bot [this message]

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=20260928160811.553C81F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sarath.ganapathiraju@oss.qualcomm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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