linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
@ 2025-12-04  9:50 Arnd Bergmann
  2025-12-04 10:07 ` Conor Dooley
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2025-12-04  9:50 UTC (permalink / raw)
  To: Linus Walleij, Conor Dooley
  Cc: Arnd Bergmann, Andy Shevchenko, Bartosz Golaszewski, Yulin Lu,
	linux-gpio, linux-kernel

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


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

* Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
  2025-12-04  9:50 [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers Arnd Bergmann
@ 2025-12-04 10:07 ` Conor Dooley
  2025-12-04 12:11 ` Andy Shevchenko
  2025-12-04 19:40 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2025-12-04 10:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Conor Dooley, Arnd Bergmann, Andy Shevchenko,
	Bartosz Golaszewski, Yulin Lu, linux-gpio, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

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>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
  2025-12-04  9:50 [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers Arnd Bergmann
  2025-12-04 10:07 ` Conor Dooley
@ 2025-12-04 12:11 ` Andy Shevchenko
  2025-12-04 13:44   ` Arnd Bergmann
  2025-12-04 19:40 ` Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2025-12-04 12:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Conor Dooley, Arnd Bergmann, Bartosz Golaszewski,
	Yulin Lu, linux-gpio, linux-kernel

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



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

* Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
  2025-12-04 12:11 ` Andy Shevchenko
@ 2025-12-04 13:44   ` Arnd Bergmann
  2025-12-04 18:56     ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2025-12-04 13:44 UTC (permalink / raw)
  To: Andy Shevchenko, Arnd Bergmann
  Cc: Linus Walleij, Conor.Dooley, Bartosz Golaszewski, Yulin Lu,
	open list:GPIO SUBSYSTEM, linux-kernel

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

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

* Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
  2025-12-04 13:44   ` Arnd Bergmann
@ 2025-12-04 18:56     ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2025-12-04 18:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Linus Walleij, Conor.Dooley, Bartosz Golaszewski,
	Yulin Lu, open list:GPIO SUBSYSTEM, linux-kernel

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



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

* Re: [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers
  2025-12-04  9:50 [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers Arnd Bergmann
  2025-12-04 10:07 ` Conor Dooley
  2025-12-04 12:11 ` Andy Shevchenko
@ 2025-12-04 19:40 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2025-12-04 19:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Conor Dooley, Arnd Bergmann, Andy Shevchenko, Bartosz Golaszewski,
	Yulin Lu, linux-gpio, linux-kernel

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

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

end of thread, other threads:[~2025-12-04 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  9:50 [PATCH] pinctrl: add CONFIG_OF dependencies for microchip drivers Arnd Bergmann
2025-12-04 10:07 ` Conor Dooley
2025-12-04 12:11 ` Andy Shevchenko
2025-12-04 13:44   ` Arnd Bergmann
2025-12-04 18:56     ` Andy Shevchenko
2025-12-04 19:40 ` 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).