[PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers

Arnd Bergmann posted 1 patch 2 weeks, 1 day ago
drivers/pinctrl/Kconfig | 2 ++
1 file changed, 2 insertions(+)
[PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Arnd Bergmann 2 weeks, 1 day ago
From: Arnd Bergmann <arnd@arndb.de>

The two newly added drivers fail to link on builds without
CONFIG_OF:

x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'

Add a Kconfig dependencies.

Fixes: 38cf9d641314 ("pinctrl: add pic64gx "gpio2" pinmux driver")
Fixes: 46397274da22 ("pinctrl: add polarfire soc iomux0 pinmux driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 2e590913fa44..bc7f37afc48b 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -489,6 +489,7 @@ config PINCTRL_PIC32MZDA
 config PINCTRL_PIC64GX
 	bool "pic64gx gpio2 pinctrl driver"
 	depends on ARCH_MICROCHIP || COMPILE_TEST
+	depends on OF
 	select GENERIC_PINCONF
 	default y
 	help
@@ -508,6 +509,7 @@ config PINCTRL_PISTACHIO
 config PINCTRL_POLARFIRE_SOC
 	bool "Polarfire SoC pinctrl driver"
 	depends on ARCH_MICROCHIP || COMPILE_TEST
+	depends on OF
 	select GENERIC_PINCONF
 	default y
 	help
-- 
2.39.5
Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Linus Walleij 2 weeks ago
On Thu, Dec 4, 2025 at 10:50 AM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> The two newly added drivers fail to link on builds without
> CONFIG_OF:
>
> x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
>
> Add a Kconfig dependencies.
>
> Fixes: 38cf9d641314 ("pinctrl: add pic64gx "gpio2" pinmux driver")
> Fixes: 46397274da22 ("pinctrl: add polarfire soc iomux0 pinmux driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied!

Trying to get my tree in order for a pull request, this comes at the
right time, thanks!

Yours,
Linus Walleij
Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Andy Shevchenko 2 weeks, 1 day ago
On Thu, Dec 04, 2025 at 10:50:14AM +0100, Arnd Bergmann wrote:
> 
> The two newly added drivers fail to link on builds without
> CONFIG_OF:
> 
> x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> 
> Add a Kconfig dependencies.

This will reduce the compile test base. In other drivers we usually put
ifdeffery in the code.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Arnd Bergmann 2 weeks, 1 day ago
On Thu, Dec 4, 2025, at 13:11, Andy Shevchenko wrote:
> On Thu, Dec 04, 2025 at 10:50:14AM +0100, Arnd Bergmann wrote:
>> 
>> The two newly added drivers fail to link on builds without
>> CONFIG_OF:
>> 
>> x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
>> pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
>> x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
>> pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
>> 
>> Add a Kconfig dependencies.
>
> This will reduce the compile test base. In other drivers we usually put
> ifdeffery in the code.

I usually prefer the Kconfig dependency: It's still covered by
both allmodconfig and half the randconfig tests on the few
architectures that don't already require CONFIG_OF on all builds.

      Arnd
Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Andy Shevchenko 2 weeks ago
On Thu, Dec 04, 2025 at 02:44:36PM +0100, Arnd Bergmann wrote:
> On Thu, Dec 4, 2025, at 13:11, Andy Shevchenko wrote:
> > On Thu, Dec 04, 2025 at 10:50:14AM +0100, Arnd Bergmann wrote:
> >> 
> >> The two newly added drivers fail to link on builds without
> >> CONFIG_OF:
> >> 
> >> x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
> >> pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> >> x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
> >> pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> >> 
> >> Add a Kconfig dependencies.
> >
> > This will reduce the compile test base. In other drivers we usually put
> > ifdeffery in the code.
> 
> I usually prefer the Kconfig dependency: It's still covered by
> both allmodconfig and half the randconfig tests on the few
> architectures that don't already require CONFIG_OF on all builds.

OK!

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
Posted by Conor Dooley 2 weeks, 1 day ago
On Thu, Dec 04, 2025 at 10:50:14AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The two newly added drivers fail to link on builds without
> CONFIG_OF:
> 
> x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> x86_64-linux-ld: drivers/pinctrl/pinctrl-mpfs-iomux0.o: in function `pinconf_generic_dt_node_to_map_all':
> pinctrl-mpfs-iomux0.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
> 
> Add a Kconfig dependencies.
> 
> Fixes: 38cf9d641314 ("pinctrl: add pic64gx "gpio2" pinmux driver")
> Fixes: 46397274da22 ("pinctrl: add polarfire soc iomux0 pinmux driver")

Acked-by: Conor Dooley <conor.dooley@microchip.com>