Skip to contentSkip to conversation

pinctrl: add CONFIG_OF dependencies for microchip drivers

PATCH In review Arnd Bergmann 5 participants 6 messages Dec 4, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: add CONFIG_OF dependencies for microchip drivers

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/pinctrl/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/Kconfig +2 -0
index 2e590913fa44..bc7f37afc48b 100644
@@ -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
Signature · 1 line
2.39.5
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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'

Quoted 4 lines

Add a Kconfig dependencies.

Fixes 38cf9d641314 ("pinctrl: add pic64gx "gpio2" pinmux driver")
Fixes 46397274da22 ("pinctrl: add polarfire soc iomux0 pinmux driver")
#2 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 9 lines · Arnd Bergmann

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'

Quoted 4 lines
Quoted 1 line

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

#4 lore raw
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · Andy Shevchenko
Quoted 9 lines · Arnd Bergmann

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'

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#5 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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'

Quoted 5 lines

Add a Kconfig dependencies.

Fixes 38cf9d641314 ("pinctrl: add pic64gx "gpio2" pinmux driver")
Fixes 46397274da22 ("pinctrl: add polarfire soc iomux0 pinmux driver")

Patch applied!

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

Yours,
Linus Walleij