linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK
@ 2021-06-03 14:06 Yu Kuai
  2021-06-07  8:08 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Kuai @ 2021-06-03 14:06 UTC (permalink / raw)
  To: sean.wang, linus.walleij, matthias.bgg
  Cc: linux-mediatek, linux-gpio, linux-kernel, linux-arm-kernel,
	yukuai3, yi.zhang

If CONFIG_PINCTRL_MT8365 is set without CONFIG_PINCTRL_MTK,
following build errors will be triggered:

aarch64-linux-gnu-ld: drivers/pinctrl/mediatek/pinctrl-mt8365.o: in function `mtk_pinctrl_probe':
pinctrl-mt8365.c:(.text+0x20): undefined reference to `mtk_pctrl_init'
aarch64-linux-gnu-ld: drivers/pinctrl/mediatek/pinctrl-mt8365.o: in function `mt8365_spec_pull_set':
pinctrl-mt8365.c:(.text+0x64): undefined reference to `mtk_pctrl_spec_pull_set_samereg'
aarch64-linux-gnu-ld: drivers/pinctrl/mediatek/pinctrl-mt8365.o: in function `mt8365_ies_smt_set':
pinctrl-mt8365.c:(.text+0xbc): undefined reference to `mtk_pconf_spec_set_ies_smt_range'
aarch64-linux-gnu-ld: pinctrl-mt8365.c:(.text+0xf0): undefined reference to `mtk_pconf_spec_set_ies_smt_range'
aarch64-linux-gnu-ld: drivers/pinctrl/mediatek/pinctrl-mt8365.o:(.data+0xa0): undefined reference to `mtk_eint_pm_ops'

Fix it by adding the dependency that CONFIG_PINCTRL_MT8365 will be
relied on CONFIG_PINCTRL_MTK.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 drivers/pinctrl/mediatek/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index b27c2070559a..3ec12651d4ef 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -157,6 +157,7 @@ config PINCTRL_MT8365
 	bool "Mediatek MT8365 pin control"
 	depends on OF
 	depends on ARM64 || COMPILE_TEST
+	depends on PINCTRL_MTK
 	default ARM64 && ARCH_MEDIATEK
 
 config PINCTRL_MT8516
-- 
2.31.1


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

* Re: [PATCH] pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK
  2021-06-03 14:06 [PATCH] pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK Yu Kuai
@ 2021-06-07  8:08 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2021-06-07  8:08 UTC (permalink / raw)
  To: Yu Kuai
  Cc: Sean Wang, Matthias Brugger,
	moderated list:ARM/Mediatek SoC support,
	open list:GPIO SUBSYSTEM, linux-kernel, Linux ARM, yi.zhang

On Thu, Jun 3, 2021 at 3:57 PM Yu Kuai <yukuai3@huawei.com> wrote:

> If CONFIG_PINCTRL_MT8365 is set without CONFIG_PINCTRL_MTK,
> following build errors will be triggered:

I made a similar patch, this patch is wrong because if you check the other
entries in the Kconfig you realized that we select the dependency for these
drivers.

Yours,
Linus Walleij

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

end of thread, other threads:[~2021-06-07  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 14:06 [PATCH] pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK Yu Kuai
2021-06-07  8:08 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).