Re: [PATCH 0/2] pmdomain: mediatek: Enable module support for mtk-scpsys

From: AngeloGioacchino Del Regno

Date: Tue Jun 23 2026 - 04:11:35 EST


On 6/3/26 07:11, Justin Yeh wrote:
This series enables the MTK_SCPSYS driver to be built as a loadable
module for GKI (Generic Kernel Image) compliance.

This series depends on the following patches currently under review:
- soc: mediatek: Allow MTK_INFRACFG to be built as module
- soc: mediatek: mtk-infracfg: Export symbols for DDK modules

The MTK_SCPSYS driver depends on MTK_INFRACFG being available as a
module, which is enabled by these prerequisite patches.

Patch 1 converts the Kconfig option from bool to tristate, allowing
the driver to be built as either built-in or as a module.

Patch 2 adds MODULE_DESCRIPTION() and converts to module_platform_driver()
to complete the modularization and silence modpost warnings.

Together these changes allow the MediaTek SCPSYS power domain driver
to support modern Android GKI/vendor_dlkm module loading requirements
while maintaining backward compatibility with the traditional built-in
configuration.


The mtk-scpsys driver should disappear, really.
This is something that was rewritten entirely and is called mtk-pm-domains now.

This driver still contains support for some very old SoCs that were not migrated
to the new mtk-pm-domains driver, but seriously, the strategy here should be to
migrate those and let the mtk-scpsys driver be there just as a legacy one to not
break the ABI for older devicetrees.

Converting this as a module is probably a bad idea, because this one didn't get
any real update for years now, and I'm not sure what is going to break by doing
so - neither I have any way of testing it.

I can say Reviewed-by if you can test booting MT2701, MT2712, MT7622, MT7623A
(all of them, really) on a build that has this driver as module and check that
all functionality is ok... but I guess you may also have difficulties in doing
that (do you even have access to old devices with those SoCs?).

Cheers,
Angelo

Justin Yeh (2):
pmdomain: mediatek: Convert MTK_SCPSYS to tristate
pmdomain: mediatek: Add MODULE_DESCRIPTION to mtk-scpsys

drivers/pmdomain/mediatek/Kconfig | 2 +-
drivers/pmdomain/mediatek/mtk-scpsys.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)