All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF
@ 2024-03-28 16:03 Nathan Chancellor
  2024-03-29  7:48 ` Luca Weiss
  2024-04-02 11:10 ` Heikki Krogerus
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2024-03-28 16:03 UTC (permalink / raw)
  To: heikki.krogerus, gregkh
  Cc: dmitry.baryshkov, luca.weiss, linux-usb, patches, Nathan Chancellor

CONFIG_DRM_AUX_BRIDGE depends on CONFIG_OF but that dependency is not
included when CONFIG_TYPEC_MUX_PTN36502 selects it, resulting in a
Kconfig warning when CONFIG_OF is disabled:

  WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
    Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
    Selected by [m]:
    - TYPEC_MUX_PTN36502 [=m] && USB_SUPPORT [=y] && TYPEC [=m] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]

Only select CONFIG_DRM_AUX_BRIDGE when CONFIG_DRM_BRIDGE and CONFIG_OF
are enabled to clear up the warning. This results in no functional
change because prior to the refactoring that introduces this warning,
ptn36502_register_bridge() returned 0 when CONFIG_OF was disabled, which
continues to occur with drm_aux_bridge_register() when
CONFIG_DRM_AUX_BRIDGE is not enabled.

Fixes: 9dc28ea21eb4 ("usb: typec: ptn36502: switch to DRM_AUX_BRIDGE")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/usb/typec/mux/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
index 4827e86fed6d..ce7db6ad3057 100644
--- a/drivers/usb/typec/mux/Kconfig
+++ b/drivers/usb/typec/mux/Kconfig
@@ -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

---
base-commit: ef83531c8e4a5f2fc9c602be7e2a300de1575ee4
change-id: 20240328-fix-ptn36502-drm_aux_bridge-select-83ddfd8a5375

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


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

* Re: [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF
  2024-03-28 16:03 [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF Nathan Chancellor
@ 2024-03-29  7:48 ` Luca Weiss
  2024-04-02 11:10 ` Heikki Krogerus
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Weiss @ 2024-03-29  7:48 UTC (permalink / raw)
  To: Nathan Chancellor, heikki.krogerus, gregkh
  Cc: dmitry.baryshkov, linux-usb, patches

On Thu Mar 28, 2024 at 5:03 PM CET, Nathan Chancellor wrote:
> CONFIG_DRM_AUX_BRIDGE depends on CONFIG_OF but that dependency is not
> included when CONFIG_TYPEC_MUX_PTN36502 selects it, resulting in a
> Kconfig warning when CONFIG_OF is disabled:
>
>   WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
>     Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
>     Selected by [m]:
>     - TYPEC_MUX_PTN36502 [=m] && USB_SUPPORT [=y] && TYPEC [=m] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
>
> Only select CONFIG_DRM_AUX_BRIDGE when CONFIG_DRM_BRIDGE and CONFIG_OF
> are enabled to clear up the warning. This results in no functional
> change because prior to the refactoring that introduces this warning,
> ptn36502_register_bridge() returned 0 when CONFIG_OF was disabled, which
> continues to occur with drm_aux_bridge_register() when
> CONFIG_DRM_AUX_BRIDGE is not enabled.

Oh, thanks! Seems I didn't see your patch for NB7VPQ904M so I made the
same mistake as there.

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>

>
> Fixes: 9dc28ea21eb4 ("usb: typec: ptn36502: switch to DRM_AUX_BRIDGE")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  drivers/usb/typec/mux/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> index 4827e86fed6d..ce7db6ad3057 100644
> --- a/drivers/usb/typec/mux/Kconfig
> +++ b/drivers/usb/typec/mux/Kconfig
> @@ -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
>
> ---
> base-commit: ef83531c8e4a5f2fc9c602be7e2a300de1575ee4
> change-id: 20240328-fix-ptn36502-drm_aux_bridge-select-83ddfd8a5375
>
> Best regards,


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

* Re: [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF
  2024-03-28 16:03 [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF Nathan Chancellor
  2024-03-29  7:48 ` Luca Weiss
@ 2024-04-02 11:10 ` Heikki Krogerus
  1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2024-04-02 11:10 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: gregkh, dmitry.baryshkov, luca.weiss, linux-usb, patches

On Thu, Mar 28, 2024 at 09:03:20AM -0700, Nathan Chancellor wrote:
> CONFIG_DRM_AUX_BRIDGE depends on CONFIG_OF but that dependency is not
> included when CONFIG_TYPEC_MUX_PTN36502 selects it, resulting in a
> Kconfig warning when CONFIG_OF is disabled:
> 
>   WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE
>     Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
>     Selected by [m]:
>     - TYPEC_MUX_PTN36502 [=m] && USB_SUPPORT [=y] && TYPEC [=m] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y]
> 
> Only select CONFIG_DRM_AUX_BRIDGE when CONFIG_DRM_BRIDGE and CONFIG_OF
> are enabled to clear up the warning. This results in no functional
> change because prior to the refactoring that introduces this warning,
> ptn36502_register_bridge() returned 0 when CONFIG_OF was disabled, which
> continues to occur with drm_aux_bridge_register() when
> CONFIG_DRM_AUX_BRIDGE is not enabled.
> 
> Fixes: 9dc28ea21eb4 ("usb: typec: ptn36502: switch to DRM_AUX_BRIDGE")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/mux/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
> index 4827e86fed6d..ce7db6ad3057 100644
> --- a/drivers/usb/typec/mux/Kconfig
> +++ b/drivers/usb/typec/mux/Kconfig
> @@ -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
> 
> ---
> base-commit: ef83531c8e4a5f2fc9c602be7e2a300de1575ee4
> change-id: 20240328-fix-ptn36502-drm_aux_bridge-select-83ddfd8a5375
> 
> Best regards,
> -- 
> Nathan Chancellor <nathan@kernel.org>

-- 
heikki

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

end of thread, other threads:[~2024-04-02 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 16:03 [PATCH] usb: typec: ptn36502: Only select DRM_AUX_BRIDGE with OF Nathan Chancellor
2024-03-29  7:48 ` Luca Weiss
2024-04-02 11:10 ` Heikki Krogerus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.