Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kathiravan Thirumoorthy" <kathiravan.thirumoorthy@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/3] regulator: qcom-refgen: add support for the IPQ9650 SoC
Date: Mon, 15 Jun 2026 08:46:45 +0000	[thread overview]
Message-ID: <20260615084646.4F0A31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260615-ipq9650_refgen-v3-3-5f611623629c@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `.is_enabled` callback maps to `regulator_is_enabled_regmap` without enabling clocks, causing a synchronous bus hang on IPQ9650 during probe.
--

commit 57e8a1a06a52f828e01d53b16f6c708e7f6df23e
Author: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>

regulator: qcom-refgen: add support for the IPQ9650 SoC

This commit adds support for the IPQ9650 SoC to the qcom-refgen regulator
driver. It introduces explicit clock management for the REFGEN blocks, as
they are not enabled on power up for this specific SoC.

> diff --git a/drivers/regulator/qcom-refgen-regulator.c b/drivers/regulator/qcom-refgen-regulator.c
> index 6a3795469927e..4b8aa40d7efe0 100644
> --- a/drivers/regulator/qcom-refgen-regulator.c
> +++ b/drivers/regulator/qcom-refgen-regulator.c
[ ... ]
> +static const struct regulator_desc ipq9650_refgen_desc = {
> +	.enable_reg = REFGEN_REG_REFGEN_STATUS,
> +	.enable_mask = REFGEN_STATUS_OUT_MASK,
> +	.enable_val = REFGEN_STATUS_OUT_ENABLE,
> +	.enable_time = 5,
> +	.name = "refgen",
> +	.owner = THIS_MODULE,
> +	.type = REGULATOR_CURRENT,
> +	.ops = &(const struct regulator_ops) {
> +		.enable		= qcom_ipq9650_refgen_enable,
> +		.disable	= qcom_ipq9650_refgen_disable,
> +		.is_enabled	= regulator_is_enabled_regmap,

[Severity: High]
Does this result in an unclocked MMIO read?

During device probe, the regulator core calls the is_enabled callback via
devm_regulator_register() to determine the initial state:

qcom_refgen_probe()
   devm_regulator_register()
      regulator_is_enabled_regmap()

Since the IPQ9650 clocks are disabled on power up and only enabled later in
qcom_ipq9650_refgen_enable(), regulator_is_enabled_regmap() will perform an
MMIO read on the REFGEN_REG_REFGEN_STATUS register without the required
clocks enabled.

Could this cause a synchronous external abort and a kernel panic during
boot?

> +	},
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260615-ipq9650_refgen-v3-0-5f611623629c@oss.qualcomm.com?part=3

  reply	other threads:[~2026-06-15  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15  8:35 [PATCH v3 0/3] Add support for the REFGEN in the IPQ9650 SoC Kathiravan Thirumoorthy
2026-06-15  8:35 ` [PATCH v3 1/3] regulator: qcom-refgen: correct the regulator type to CURRENT Kathiravan Thirumoorthy
2026-06-15  8:35 ` [PATCH v3 2/3] regulator: dt-bindings: qcom,sdm845-refgen-regulator: Document IPQ9650 Kathiravan Thirumoorthy
2026-06-15  8:35 ` [PATCH v3 3/3] regulator: qcom-refgen: add support for the IPQ9650 SoC Kathiravan Thirumoorthy
2026-06-15  8:46   ` sashiko-bot [this message]
2026-06-15  8:54     ` Kathiravan Thirumoorthy

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=20260615084646.4F0A31F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kathiravan.thirumoorthy@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --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