Skip to contentSkip to conversation

usb: typec: ptn36502: fix CONFIG_OF dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 4, 2024

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

PATCH 1/1 usb: typec: ptn36502: fix CONFIG_OF dependency

From: Arnd Bergmann <[email protected]>

When CONFIG_OF is disabled, TYPEC_MUX_PTN36502 causes a Kconfig warning:

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_PTN36502 [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]

It doesn't actually seem to be required here, so just avoid the warning with a narrower select statement and use the same condition that Nathan added for NB7VPQ904M.

Fixes 9dc28ea21eb4 ("usb: typec: ptn36502: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/Kconfig +1 -1
index 4827e86fed6d..ce7db6ad3057 100644
@@ -60,7 +60,7 @@ config TYPEC_MUX_PTN36502
 	tristate "NXP PTN36502 Type-C redriver driver"
 	depends on I2C
 	depends on DRM || DRM=n
-	select DRM_AUX_BRIDGE if DRM_BRIDGE
+	select DRM_AUX_BRIDGE if DRM_BRIDGE && OF
 	select REGMAP_I2C
 	help
 	  Say Y or M if your system has a NXP PTN36502 Type-C redriver chip
Signature · 1 line
2.39.2
#1 lore raw
Quoted 4 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

When CONFIG_OF is disabled, TYPEC_MUX_PTN36502 causes a Kconfig warning:

Quoted 8 lines

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_PTN36502 [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]

It doesn't actually seem to be required here, so just avoid the warning with a narrower select statement and use the same condition that Nathan added for NB7VPQ904M.

Hi,

This has already been sent by Nathan, just hasn't been picked up yet I guess.

https://lore.kernel.org/linux-patches/20240328-fix-ptn36502-drm_aux_bridge-select-v1-1-85552117e26e@kernel.org/

Regards
Luca

Quoted 20 lines
Fixes 9dc28ea21eb4 ("usb: typec: ptn36502: switch to DRM_AUX_BRIDGE")
---
 drivers/usb/typec/mux/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/Kconfig +1 -1
index 4827e86fed6d..ce7db6ad3057 100644
@@ -60,7 +60,7 @@ config TYPEC_MUX_PTN36502
 	tristate "NXP PTN36502 Type-C redriver driver"
 	depends on I2C
 	depends on DRM || DRM=n
-	select DRM_AUX_BRIDGE if DRM_BRIDGE
+	select DRM_AUX_BRIDGE if DRM_BRIDGE && OF
 	select REGMAP_I2C
 	help
 	  Say Y or M if your system has a NXP PTN36502 Type-C redriver chip