[PATCH RESEND] soc: mediatek: mtk-regulator-coupler: Allow building as a module
From: Justin Yeh
Date: Tue Nov 03 2026 - 21:40:44 EST
MTK_REGULATOR_COUPLER is a bool whose prompt is only visible when
COMPILE_TEST is set, so on real MediaTek configurations the symbol has
no prompt at all and is forced to its default: it can only ever be
built in.
Turn it into a visible tristate so that the coupler can also be built
as a loadable module, which is what kernels shipping most of their
drivers as modules need. The "default ARCH_MEDIATEK" is kept, so
existing configurations keep building it in.
While at it, add the help text that the now user-visible prompt was
missing.
Signed-off-by: Justin Yeh <justin.yeh@xxxxxxxxxxxx>
---
Resend, now that the dependency is in mainline: this was patch 2/2 of
https://lore.kernel.org/all/20260903062056.1024263-3-justin.yeh@xxxxxxxxxxxx/
and patch 1/2 ("regulator: core: Export helpers used by regulator
couplers") was merged as commit 59951bd9c6b6 ("regulator: core: Export
helpers used by regulator couplers") and is in v7.4-rc1. The diff is
unchanged; it is resent on top of v7.4-rc1 as a standalone patch, as
AngeloGioacchino asked.
drivers/soc/mediatek/Kconfig | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index d7293977f06e..4a2f2bccc213 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -56,9 +56,13 @@ config MTK_PMIC_WRAP
hardware to connect the PMIC.
config MTK_REGULATOR_COUPLER
- bool "MediaTek SoC Regulator Coupler" if COMPILE_TEST
+ tristate "MediaTek SoC Regulator Coupler"
default ARCH_MEDIATEK
depends on REGULATOR
+ help
+ Say yes here to add support for the MediaTek regulator coupler,
+ which keeps the GPU supply and its coupled GPU SRAM supply
+ voltage-balanced on the MediaTek SoCs that need it.
config MTK_MMSYS
tristate "MediaTek MMSYS Support"
--
2.45.2