Skip to contentSkip to conversation

usb: typec: nb7vpq904m: add CONFIG_OF dependency

PATCH In review Arnd Bergmann 5 participants 11 messages Dec 6, 2023 – Dec 7, 2023

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

PATCH 1/1 usb: typec: nb7vpq904m: add CONFIG_OF dependency

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/Kconfig +1 -0
index 5120942f309d..818624f59120 100644
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
 	tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
 	depends on I2C
 	depends on DRM || DRM=n
+	depends on OF
 	select DRM_AUX_BRIDGE if DRM_BRIDGE
 	select REGMAP_I2C
 	help
Signature · 1 line
2.39.2
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 17 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Quoted 2 lines
Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")

Thanks.

Quoted 16 lines
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/Kconfig +1 -0
index 5120942f309d..818624f59120 100644
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
 	tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
 	depends on I2C
 	depends on DRM || DRM=n
+	depends on OF
 	select DRM_AUX_BRIDGE if DRM_BRIDGE
 	select REGMAP_I2C
 	help
Signature · 1 line
~Randy
maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 28 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/Kconfig +0 -0
index 5120942f309d..818624f59120 100644

drivers/usb/typec/mux/Kconfig config TYPEC_MUX_NB7VPQ904M · line 46

Quoted 7 lines
drivers/usb/typec/mux/Kconfig +1 -0
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
 	tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
 	depends on I2C
 	depends on DRM || DRM=n
+	depends on OF
 	select DRM_AUX_BRIDGE if DRM_BRIDGE
 	select REGMAP_I2C
 	help

Shouldn't DRM_BRIDGE depend on OF instead?

thanks,

Signature · 1 line
heikki
#3 lore raw
Quoted 25 lines · Heikki Krogerus
Quoted 23 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

drivers/usb/typec/mux/Kconfig config TYPEC_MUX_NB7VPQ904M · line 46

Quoted 12 lines
drivers/usb/typec/mux/Kconfig +1 -0
index 5120942f309d..818624f59120 100644
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
      tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
      depends on I2C
      depends on DRM || DRM=n
+     depends on OF
      select DRM_AUX_BRIDGE if DRM_BRIDGE
      select REGMAP_I2C
      help

Shouldn't DRM_BRIDGE depend on OF instead?

No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.

Signature · 2 lines
With best wishes
Dmitry
maintainer
#4 lore raw
Quoted 42 lines · Dmitry Baryshkov
Quoted 25 lines · Heikki Krogerus
Quoted 23 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

drivers/usb/typec/mux/Kconfig config TYPEC_MUX_NB7VPQ904M · line 46

Quoted 12 lines
drivers/usb/typec/mux/Kconfig +1 -0
index 5120942f309d..818624f59120 100644
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
      tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
      depends on I2C
      depends on DRM || DRM=n
+     depends on OF
      select DRM_AUX_BRIDGE if DRM_BRIDGE
      select REGMAP_I2C
      help

Shouldn't DRM_BRIDGE depend on OF instead?

Quoted 1 line

No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

thanks,

Signature · 1 line
heikki
#5 lore raw
Quoted 44 lines · Heikki Krogerus
Quoted 42 lines · Dmitry Baryshkov
Quoted 39 lines · Heikki Krogerus
Quoted 28 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/Kconfig +0 -0
index 5120942f309d..818624f59120 100644

drivers/usb/typec/mux/Kconfig config TYPEC_MUX_NB7VPQ904M · line 46

Quoted 7 lines
drivers/usb/typec/mux/Kconfig +1 -0
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
      tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
      depends on I2C
      depends on DRM || DRM=n
+     depends on OF
      select DRM_AUX_BRIDGE if DRM_BRIDGE
      select REGMAP_I2C
      help

Shouldn't DRM_BRIDGE depend on OF instead?

Quoted 5 lines
Quoted 1 line

No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

Yes, this is what a patch from Nathan does:
https://patchwork.freedesktop.org/patch/570638/?series=127385&rev=1

Signature · 2 lines
With best wishes
Dmitry
maintainer
#6 lore raw
Quoted 46 lines · Dmitry Baryshkov
Quoted 44 lines · Heikki Krogerus
Quoted 42 lines · Dmitry Baryshkov
Quoted 39 lines · Heikki Krogerus
Quoted 28 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

DRM_AUX_BRIDGE depends on CONFIG_OF, so the same dependency is needed here to avoid a build failure:

WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
Selected by [y]:
- TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_register':
aux-bridge.c:(.text+0x13b): undefined reference to `auxiliary_device_init'
x86_64-linux-ld: aux-bridge.c:(.text+0x14d): undefined reference to `__auxiliary_device_add'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_init':
aux-bridge.c:(.init.text+0x15): undefined reference to `__auxiliary_driver_register'
x86_64-linux-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_drv_exit':
aux-bridge.c:(.exit.text+0x9): undefined reference to `auxiliary_driver_unregister'

Fixes c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/Kconfig +0 -0
index 5120942f309d..818624f59120 100644

drivers/usb/typec/mux/Kconfig config TYPEC_MUX_NB7VPQ904M · line 46

Quoted 7 lines
drivers/usb/typec/mux/Kconfig +1 -0
@@ -40,6 +40,7 @@ config TYPEC_MUX_NB7VPQ904M
      tristate "On Semiconductor NB7VPQ904M Type-C redriver driver"
      depends on I2C
      depends on DRM || DRM=n
+     depends on OF
      select DRM_AUX_BRIDGE if DRM_BRIDGE
      select REGMAP_I2C
      help

Shouldn't DRM_BRIDGE depend on OF instead?

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

No. DRM_AUX_BRIDGE depends on OF, DRM_BRIDGE framework doesn't.

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

Yes, this is what a patch from Nathan does:
https://patchwork.freedesktop.org/patch/570638/?series=127385&rev=1

Ah, sorry about the noise.

thanks,

Signature · 1 line
heikki
#7 lore raw
In reply to Heikki Krogerus
Quoted 7 lines · Heikki Krogerus

On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

I think that fails if CONFIG_OF is disabled and CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register() will still be called from a built-in driver in that case but can't be linked against.

Arnd

#8 lore raw
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Heikki Krogerus

On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:

Okay, so this probable should also be

Quoted 8 lines
Quoted 3 lines

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

I think that fails if CONFIG_OF is disabled and CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register() will still be called from a built-in driver in that case but can't be linked against.

If DRM_AUX_BRIDGE is not enabled, then the stubs from include/drm/bridge/aux-bridge will be used instead.

Signature · 2 lines
With best wishes
Dmitry
#9 lore raw
Quoted 11 lines · Dmitry Baryshkov
Quoted 10 lines · Arnd Bergmann
Quoted 7 lines · Heikki Krogerus

On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

Quoted 7 lines
Quoted 4 lines

I think that fails if CONFIG_OF is disabled and CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register() will still be called from a built-in driver in that case but can't be linked against.

If DRM_AUX_BRIDGE is not enabled, then the stubs from include/drm/bridge/aux-bridge will be used instead.

Sorry, I meant to write CONFIG_DRM_AUX_BRIDGE=m here.

Arnd

#10 lore raw
Quoted 18 lines · Arnd Bergmann
Quoted 16 lines · Dmitry Baryshkov
Quoted 14 lines · Arnd Bergmann
Quoted 7 lines · Heikki Krogerus

On Thu, Dec 07, 2023 at 01:55:06PM +0200, Dmitry Baryshkov wrote:

Okay, so this probable should also be

select DRM_AUX_BRIDGE if DRM_BRIDGE and OF

No?

I think that fails if CONFIG_OF is disabled and CONFIG_DRM_AUX_BRIDGE, since drm_aux_bridge_register() will still be called from a built-in driver in that case but can't be linked against.

Quoted 4 lines
Quoted 2 lines

If DRM_AUX_BRIDGE is not enabled, then the stubs from include/drm/bridge/aux-bridge will be used instead.

Sorry, I meant to write CONFIG_DRM_AUX_BRIDGE=m here.

Like having NB7VPQ904M=y, OF=n and DRM_AUX_BRIDGE=m? And the select will not work, since the condition is not fulfilled. Good question.

Signature · 2 lines
With best wishes
Dmitry