Re: [PATCH v5 2/3] pmdomain: imx: scu-pd: allow building as a module

Peng Fan <[email protected]>
Newsgroups dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm
Message-ID <amcMtNFqcfb40Oe+@shlinux89>
On Thu, Jul 23, 2026 at 11:05:23AM +0900, [email protected] wrote:
>From: Zhipeng Wang <[email protected]>
>
>Convert CONFIG_IMX_SCU_PD from bool to tristate to allow building as a
>loadable module. This is needed on Android devices using the Generic
>Kernel Image (GKI), where SoC-specific drivers must be built as modules
>rather than built into the core kernel image.
>
>For i.MX8Q devices running Android with a GKI kernel, the SCU power
>domain driver must be loadable. Without tristate support, power domains
>cannot be properly initialized, preventing these systems from
>functioning under GKI.
>
>Use subsys_initcall() so that when built-in the power domain provider
>probes before its consumers (e.g. the SCU clock driver at
>device_initcall level), fixing "failed to attached the power domain"
>warnings at boot. When built as a module, subsys_initcall() is
>equivalent to module_init(). No module_exit() is provided because the
>SCU power domain provider is a system-level resource that cannot be
>safely removed at runtime.
>
>Add MODULE_DEVICE_TABLE() for OF-based module autoloading.
>
>Signed-off-by: Zhipeng Wang <[email protected]>

Reviewed-by: Peng Fan <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.