[PATCH 0/2] Allow mtk-regulator-coupler to be built as a module
Justin Yeh
justin.yeh at mediatek.com
Wed Sep 2 23:20:45 PDT 2026
MTK_REGULATOR_COUPLER can currently only be built into the kernel: it is
a bool, and its prompt is hidden unless COMPILE_TEST is set, so on real
MediaTek configurations the symbol has no prompt and is forced to its
"default ARCH_MEDIATEK" value.
Kernels that ship nearly everything as a module (Android GKI style
kernels, but distro kernels have the same shape) cannot use it that way.
Two things are in the way:
- the four helpers the coupler calls are declared in
include/linux/regulator/coupler.h for coupler implementations to
use, but none of them is exported (patch 1);
- the Kconfig symbol is a bool without a usable prompt (patch 2).
With both patches applied, CONFIG_MTK_REGULATOR_COUPLER=m builds and
mtk_regulator_coupler.ko loads and registers the coupler. Existing
configurations are unaffected: "default ARCH_MEDIATEK" is kept, so they
keep building the coupler in.
Justin Yeh (2):
regulator: core: Export helpers used by regulator couplers
soc: mediatek: mtk-regulator-coupler: Allow building as a module
drivers/regulator/core.c | 4 ++++
drivers/soc/mediatek/Kconfig | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
--
2.45.2
More information about the linux-arm-kernel
mailing list