Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Allow mtk-regulator-coupler to be built as a module
@ 2026-09-03  6:20 Justin Yeh
  2026-09-03  6:20 ` [PATCH 1/2] regulator: core: Export helpers used by regulator couplers Justin Yeh
  2026-09-03  6:20 ` [PATCH 2/2] soc: mediatek: mtk-regulator-coupler: Allow building as a module Justin Yeh
  0 siblings, 2 replies; 4+ messages in thread
From: Justin Yeh @ 2026-09-03  6:20 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Project_Global_Chrome_Upstream_Group, linux-arm-kernel,
	linux-kernel, linux-mediatek, Justin Yeh

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-03 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  6:20 [PATCH 0/2] Allow mtk-regulator-coupler to be built as a module Justin Yeh
2026-09-03  6:20 ` [PATCH 1/2] regulator: core: Export helpers used by regulator couplers Justin Yeh
2026-09-03 23:07   ` Mark Brown
2026-09-03  6:20 ` [PATCH 2/2] soc: mediatek: mtk-regulator-coupler: Allow building as a module Justin Yeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox