Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Justin Yeh <justin.yeh@mediatek.com>,
	Sean Wang <sean.wang@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Project_Global_Chrome_Upstream_Group@mediatek.com,
	linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 3/5] pinctrl: mediatek: allow common drivers to be built as modules
Date: Fri, 24 Jul 2026 14:24:34 +0200	[thread overview]
Message-ID: <cc5348d5-3bda-42be-915a-476635708165@collabora.com> (raw)
In-Reply-To: <20260723035823.2041832-4-justin.yeh@mediatek.com>

On 7/23/26 05:58, Justin Yeh wrote:
> The MediaTek SoC pinctrl drivers link against the shared implementations
> in pinctrl-mtk-common.c (v1), pinctrl-moore.c and pinctrl-mtmips.c. These
> were built-in only: their Kconfig symbols were bool, they did not export
> their entry points and they carried no MODULE_LICENSE().
> 
> To let the individual SoC drivers be built as loadable modules (required
> for Android GKI + vendor_dlkm, where vendor drivers must live outside the
> GKI vmlinux), the shared code they depend on has to be modular too.
> Otherwise selecting a SoC driver as =m forces the common symbol to =y and
> the resulting module fails to link against the unexported common entry
> points.
> 
> Convert PINCTRL_MTK, PINCTRL_MTK_MOORE and PINCTRL_MTK_MTMIPS to
> tristate, export the entry points used by the SoC drivers, and add
> MODULE_DESCRIPTION()/MODULE_LICENSE() to the three common files.
> 
> The v2 common code (PINCTRL_MTK_V2) is already modular, but mtk_rmw() was
> never exported. It is called directly by SoC drivers such as mt7623, so
> export it as well to keep those drivers linking once they are modular.
> 
> Rather than exporting these shared symbols into the global namespace,
> export them in the "MTK_PINCTRL" symbol namespace with
> EXPORT_SYMBOL_NS_GPL() so they are only visible to drivers that opt in.
> Each SoC driver that uses them therefore declares
> MODULE_IMPORT_NS("MTK_PINCTRL").
> 
> Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>

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


  reply	other threads:[~2026-07-24 12:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  3:58 [PATCH v7 0/5] pinctrl: mediatek: Enable module build support Justin Yeh
2026-07-23  3:58 ` [PATCH v7 1/5] pinctrl: mediatek: use devm_gpiochip_add_data() for GPIO chip Justin Yeh
2026-07-23  3:58 ` [PATCH v7 2/5] pinctrl: mediatek: free EINT resources on unbind Justin Yeh
2026-07-23  3:58 ` [PATCH v7 3/5] pinctrl: mediatek: allow common drivers to be built as modules Justin Yeh
2026-07-24 12:24   ` AngeloGioacchino Del Regno [this message]
2026-07-23  3:58 ` [PATCH v7 4/5] pinctrl: mediatek: mt7986: register both platform drivers from a single initcall Justin Yeh
2026-07-24 12:24   ` AngeloGioacchino Del Regno
2026-07-23  3:58 ` [PATCH v7 5/5] pinctrl: mediatek: enable module build support for all SoC drivers Justin Yeh
2026-07-25 13:02 ` [PATCH v7 0/5] pinctrl: mediatek: Enable module build support Linus Walleij
2026-07-25 13:10   ` Linus Walleij
2026-07-27  5:08     ` Justin Yeh (葉英茂)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc5348d5-3bda-42be-915a-476635708165@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=justin.yeh@mediatek.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sean.wang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox