mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module
@ 2026-05-29 10:02 Justin Yeh
  2026-05-29 10:02 ` [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate Justin Yeh
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Justin Yeh @ 2026-05-29 10:02 UTC (permalink / raw)
  To: Sean Wang, Linus Walleij, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel, Justin Yeh

This series enables PINCTRL_MT8189 to be built as a loadable kernel
module, which is required for GKI (Generic Kernel Image) + vendor_dlkm
deployments where vendor-specific drivers must be kept separate from
the GKI vmlinux.

Patch 1 restores the tristate option that was recently changed to bool,
preventing module builds. Patch 2 adds the missing MODULE_LICENSE macro
that's required when building as a module.

Together these changes allow MT8189 pinctrl to be properly packaged as
a vendor kernel module while maintaining the existing built-in option.

Justin Yeh (2):
  pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate
  pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration

 drivers/pinctrl/mediatek/Kconfig          | 2 +-
 drivers/pinctrl/mediatek/pinctrl-mt8189.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
2.45.2


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

* [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate
  2026-05-29 10:02 [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Justin Yeh
@ 2026-05-29 10:02 ` Justin Yeh
  2026-06-23  8:06   ` AngeloGioacchino Del Regno
  2026-05-29 10:02 ` [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration Justin Yeh
  2026-06-08 19:29 ` [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Justin Yeh @ 2026-05-29 10:02 UTC (permalink / raw)
  To: Sean Wang, Linus Walleij, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel, Justin Yeh

Under the GKI + vendor_dlkm model, vendor-specific pinctrl cannot be
built into the GKI vmlinux. Upstream's recent switch of PINCTRL_MT8189
to bool prevents building as a loadable module, which breaks DDK module
usage. Restore tristate so MT8189 pinctrl can be packaged as a kernel
module in vendor_dlkm.

Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>
---
 drivers/pinctrl/mediatek/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 4819617d9368..a75434e7e989 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -270,7 +270,7 @@ config PINCTRL_MT8188
 	  map specific eint which doesn't have real gpio pin.
 
 config PINCTRL_MT8189
-        bool "MediaTek MT8189 pin control"
+        tristate "MediaTek MT8189 pin control"
         depends on OF
         depends on ARM64 || COMPILE_TEST
         default ARM64 && ARCH_MEDIATEK
-- 
2.45.2


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

* [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration
  2026-05-29 10:02 [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Justin Yeh
  2026-05-29 10:02 ` [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate Justin Yeh
@ 2026-05-29 10:02 ` Justin Yeh
  2026-06-23  8:06   ` AngeloGioacchino Del Regno
  2026-06-08 19:29 ` [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Justin Yeh @ 2026-05-29 10:02 UTC (permalink / raw)
  To: Sean Wang, Linus Walleij, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel, Justin Yeh

Add missing MODULE_LICENSE("GPL v2") macro to fix modpost error during
kernel module build. The license identifier matches the SPDX header
(GPL-2.0) at the top of the file.

This fixes the following build error:
  ERROR: modpost: missing MODULE_LICENSE() in pinctrl-mt8189.o

Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mt8189.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8189.c b/drivers/pinctrl/mediatek/pinctrl-mt8189.c
index cd4cdff309a1..a9c128c514a4 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt8189.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt8189.c
@@ -1696,3 +1696,4 @@ static int __init mt8189_pinctrl_init(void)
 arch_initcall(mt8189_pinctrl_init);
 
 MODULE_DESCRIPTION("MediaTek MT8189 Pinctrl Driver");
+MODULE_LICENSE("GPL v2");
-- 
2.45.2


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

* Re: [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module
  2026-05-29 10:02 [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Justin Yeh
  2026-05-29 10:02 ` [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate Justin Yeh
  2026-05-29 10:02 ` [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration Justin Yeh
@ 2026-06-08 19:29 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2026-06-08 19:29 UTC (permalink / raw)
  To: Justin Yeh
  Cc: Sean Wang, Matthias Brugger, AngeloGioacchino Del Regno,
	Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel

On Fri, May 29, 2026 at 12:04 PM Justin Yeh <justin.yeh@mediatek.com> wrote:

> This series enables PINCTRL_MT8189 to be built as a loadable kernel
> module, which is required for GKI (Generic Kernel Image) + vendor_dlkm
> deployments where vendor-specific drivers must be kept separate from
> the GKI vmlinux.

Maybe tell us that this is for Android?

> Patch 1 restores the tristate option that was recently changed to bool,

No the driver was merged with tristate.
See
commit a3fe1324c3c5c292ec79bd756497c1c44ff247d2 (tag: pinctrl-v6.17-1)
"pinctrl: mediatek: Add pinctrl driver for mt8189"

> preventing module builds. Patch 2 adds the missing MODULE_LICENSE macro
> that's required when building as a module.

So that should be squashed into one patch or it will not bisect.

> Together these changes allow MT8189 pinctrl to be properly packaged as
> a vendor kernel module while maintaining the existing built-in option.

So why do we change this only for MT8189 and not for all
Mediatek pinctrl drivers?

I would just add this tristate option and license to all of them while
you're at it or I will get like 20 identical patches and it's a waste
of time for me.

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration
  2026-05-29 10:02 ` [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration Justin Yeh
@ 2026-06-23  8:06   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 6+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-06-23  8:06 UTC (permalink / raw)
  To: Justin Yeh, Sean Wang, Linus Walleij, Matthias Brugger
  Cc: Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel

On 5/29/26 12:02, Justin Yeh wrote:
> Add missing MODULE_LICENSE("GPL v2") macro to fix modpost error during
> kernel module build. The license identifier matches the SPDX header
> (GPL-2.0) at the top of the file.
> 
> This fixes the following build error:
>    ERROR: modpost: missing MODULE_LICENSE() in pinctrl-mt8189.o
> 
> Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>

Please, do this for all MediaTek pinctrl drivers.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

* Re: [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate
  2026-05-29 10:02 ` [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate Justin Yeh
@ 2026-06-23  8:06   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 6+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-06-23  8:06 UTC (permalink / raw)
  To: Justin Yeh, Sean Wang, Linus Walleij, Matthias Brugger
  Cc: Project_Global_Chrome_Upstream_Group, linux-mediatek, linux-gpio,
	linux-kernel, linux-arm-kernel

On 5/29/26 12:02, Justin Yeh wrote:
> Under the GKI + vendor_dlkm model, vendor-specific pinctrl cannot be
> built into the GKI vmlinux. Upstream's recent switch of PINCTRL_MT8189
> to bool prevents building as a loadable module, which breaks DDK module
> usage. Restore tristate so MT8189 pinctrl can be packaged as a kernel
> module in vendor_dlkm.
> 
> Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>

The MODULE_LICENSE change shall come before this one.

Besides - since there's no problem in having the pinctrl drivers as module for
MT8189, I imagine that this is analogously true for all (or most of) the others.

Looks like getting those to build as modules is trivial, too - so, can you at
this point please do the same for all of the MediaTek pinctrl drivers that are
trivial to enable as tristate?

P.S.: After reordering the commits, this one is
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Thanks,
Angelo

> ---
>   drivers/pinctrl/mediatek/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
> index 4819617d9368..a75434e7e989 100644
> --- a/drivers/pinctrl/mediatek/Kconfig
> +++ b/drivers/pinctrl/mediatek/Kconfig
> @@ -270,7 +270,7 @@ config PINCTRL_MT8188
>   	  map specific eint which doesn't have real gpio pin.
>   
>   config PINCTRL_MT8189
> -        bool "MediaTek MT8189 pin control"
> +        tristate "MediaTek MT8189 pin control"
>           depends on OF
>           depends on ARM64 || COMPILE_TEST
>           default ARM64 && ARCH_MEDIATEK



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

end of thread, other threads:[~2026-06-23  8:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-29 10:02 [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Justin Yeh
2026-05-29 10:02 ` [PATCH 1/2] pinctrl: mediatek: Restore PINCTRL_MT8189 to tristate Justin Yeh
2026-06-23  8:06   ` AngeloGioacchino Del Regno
2026-05-29 10:02 ` [PATCH 2/2] pinctrl: mediatek: mt8189: Add MODULE_LICENSE declaration Justin Yeh
2026-06-23  8:06   ` AngeloGioacchino Del Regno
2026-06-08 19:29 ` [PATCH 0/2] pinctrl: mediatek: Enable MT8189 as loadable module Linus Walleij

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

all inboxes | Powered by JetHome®