Skip to content

Allow mtk-regulator-coupler to be built as a module

Justin Yeh linux-arm-kernel linux-mediatek lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2regulator: core: Export helpers used by regulator couplersdrivers/regulator/core.c+4 -01 reply
2/2soc: mediatek: mtk-regulator-coupler: Allow building as a moduledrivers/soc/mediatek/Kconfig+5 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMark Brown
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Allow mtk-regulator-coupler to be built as a module

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(-)
Signature · 1 line
2.45.2