Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Zhipeng.wang_1@oss.nxp.com
Cc: conor+dt@kernel.org, Frank.Li@kernel.org, imx@lists.linux.dev,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 2/2] pmdomain: imx: scu-pd: allow building as a module
Date: Wed, 22 Jul 2026 07:35:32 +0000	[thread overview]
Message-ID: <20260722073533.04C031F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722071512.3494011-3-Zhipeng.wang_1@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Building the SCU PM domain driver as a module breaks power domain attachment for SCU clocks due to unhandled deferred probing.
--

--- Patch [2]: [PATCH v3 2/2] pmdomain: imx: scu-pd: allow building as a module ---
commit 8b0026aca4b6a877c269d6333189db725f3c6d76
Author: Zhipeng Wang <zhipeng.wang_1@nxp.com>

pmdomain: imx: scu-pd: allow building as a module

This commit converts the IMX_SCU_PD config from bool to tristate to allow
building the SCU power domain driver as a loadable module, which is
required for Android GKI kernels.

> diff --git a/drivers/pmdomain/imx/Kconfig b/drivers/pmdomain/imx/Kconfig
> index 00203615c65e9..472e9dec6bd4e 100644
> --- a/drivers/pmdomain/imx/Kconfig
> +++ b/drivers/pmdomain/imx/Kconfig
> @@ -21,7 +21,7 @@ config IMX9_BLK_CTRL
>  	depends on PM_GENERIC_DOMAINS
>  
>  config IMX_SCU_PD
> -	bool "IMX SCU Power Domain driver"
> +	tristate "IMX SCU Power Domain driver"

[Severity: High]
Does building the power domain driver as a module break power domain
attachment for SCU clocks?

If IMX_SCU_PD is built as a module, there are no explicit symbol dependencies
or softdeps between the SCU clock driver and the PD provider, meaning the
clock driver might be loaded first.

Looking at the consumer side in drivers/clk/imx/clk-scu.c:

imx_clk_scu_alloc_dev() {
    ...
    ret = imx_clk_scu_attach_pd(&pdev->dev, rsrc_id);
    if (ret)
        pr_warn("%s: failed to attached the power domain %d\n",
            name, ret);

    ret = platform_device_add(pdev);
    ...
}

Since the consumer ignores the return value from the attachment attempt, an
error like -ENOENT (when the provider is not registered yet) will not
trigger a deferred probe. Furthermore, because these software-created clock
devices lack an of_node, the device core's standard deferred probing
mechanisms cannot retry the attachment later.

Will this leave the SCU clocks permanently registered without their power
domains attached, potentially causing hardware malfunctions or continuous
power waste?

>  	depends on IMX_SCU
>  	help
>  	  The System Controller Firmware (SCFW) based power domain driver.

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260722071512.3494011-1-Zhipeng.wang_1@oss.nxp.com?part=2

      reply	other threads:[~2026-07-22  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  7:15 [PATCH v3 0/2] pmdomain: imx: build the SCU power domain driver as a module Zhipeng.wang_1
2026-07-22  7:15 ` [PATCH v3 1/2] of: export of_stdout symbol Zhipeng.wang_1
2026-07-22  7:15 ` [PATCH v3 2/2] pmdomain: imx: scu-pd: allow building as a module Zhipeng.wang_1
2026-07-22  7:35   ` 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=20260722073533.04C031F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=Zhipeng.wang_1@oss.nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --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