diff mbox series

pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK

Message ID 20210603140618.3044976-1-yukuai3@huawei.com (mailing list archive)
State New, archived
Headers show
Series pinctrl: mediatek: fix build error without CONFIG_PINCTRL_MTK | expand

Commit Message

Yu Kuai June 3, 2021, 2:06 p.m. UTC
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(+)

Comments

Linus Walleij June 7, 2021, 8:08 a.m. UTC | #1
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
diff mbox series

Patch

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