Skip to contentSkip to conversation

usb: typec: altmodes: select DRM_AUX_HPD_BRIDGE for TYPEC_DP_ALTMODE

PATCH In review Chaoyi Chen 3 participants 6 messages Jul 9 – Jul 16

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

PATCH v3 1/1 usb: typec: altmodes: select DRM_AUX_HPD_BRIDGE for TYPEC_DP_ALTMODE

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +1 -0
index 7867fa7c405d..b054c0b6a8d4 100644
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF
 	help
 	  DisplayPort USB Type-C Alternate Mode allows DisplayPort
 	  displays and adapters to be attached to the USB Type-C
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 25 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +0 -0
index 7867fa7c405d..b054c0b6a8d4 100644

drivers/usb/typec/altmodes/Kconfig menu "USB Type-C Alternate Mode drivers" · line 8

Quoted 4 lines
drivers/usb/typec/altmodes/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF

Is there really no way of making this into a dependency? Doesn't this, or something like it not work:

        depends on (DRM_AUX_HPD_BRIDGE && DRM_BRIDGE && OF) || !DRM_AUX_HPD_BRIDGE

Thanks,

Quoted 5 lines
drivers/usb/typec/altmodes/Kconfig +0 -0
 	help
 	  DisplayPort USB Type-C Alternate Mode allows DisplayPort
 	  displays and adapters to be attached to the USB Type-C
Signature · 1 line
2.54.0
Signature · 1 line
heikki
#2 lore raw

Hi Heikki,

Quoted 34 lines · Heikki Krogerus
Quoted 25 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +0 -0
index 7867fa7c405d..b054c0b6a8d4 100644

drivers/usb/typec/altmodes/Kconfig menu "USB Type-C Alternate Mode drivers" · line 8

Quoted 4 lines
drivers/usb/typec/altmodes/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF

Is there really no way of making this into a dependency? Doesn't this, or something like it not work:

Quoted 2 lines
        depends on (DRM_AUX_HPD_BRIDGE && DRM_BRIDGE && OF) || !DRM_AUX_HPD_BRIDGE

I think Xu originally wanted to select this item directly, since it wasn't visible in the menu and there was nowhere to select it on some platforms.

Quoted 8 lines

Thanks,

Quoted 5 lines
drivers/usb/typec/altmodes/Kconfig +0 -0
 	help
 	  DisplayPort USB Type-C Alternate Mode allows DisplayPort
 	  displays and adapters to be attached to the USB Type-C
Signature · 1 line
2.54.0
Signature · 2 lines
Best, 
Chaoyi
maintainer
#3 lore raw
Quoted 37 lines · Chaoyi Chen

Hi Heikki,

Quoted 34 lines · Heikki Krogerus
Quoted 25 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +0 -0
index 7867fa7c405d..b054c0b6a8d4 100644

drivers/usb/typec/altmodes/Kconfig menu "USB Type-C Alternate Mode drivers" · line 8

Quoted 4 lines
drivers/usb/typec/altmodes/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF

Is there really no way of making this into a dependency? Doesn't this, or something like it not work:

Quoted 5 lines
Quoted 2 lines
        depends on (DRM_AUX_HPD_BRIDGE && DRM_BRIDGE && OF) || !DRM_AUX_HPD_BRIDGE

I think Xu originally wanted to select this item directly, since it wasn't visible in the menu and there was nowhere to select it on some platforms.

But now it is user selectable, no?

Thanks,

Signature · 1 line
heikki
#4 lore raw
Quoted 38 lines · Heikki Krogerus
Quoted 37 lines · Chaoyi Chen

Hi Heikki,

Quoted 34 lines · Heikki Krogerus
Quoted 25 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +0 -0
index 7867fa7c405d..b054c0b6a8d4 100644

drivers/usb/typec/altmodes/Kconfig menu "USB Type-C Alternate Mode drivers" · line 8

Quoted 4 lines
drivers/usb/typec/altmodes/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF

Is there really no way of making this into a dependency? Doesn't this, or something like it not work:

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
        depends on (DRM_AUX_HPD_BRIDGE && DRM_BRIDGE && OF) || !DRM_AUX_HPD_BRIDGE

I think Xu originally wanted to select this item directly, since it wasn't visible in the menu and there was nowhere to select it on some platforms.

But now it is user selectable, no?

No, currently it needs to be explicitly selected in Kconfig, and it is not visible to the user.

Quoted 3 lines

Thanks,

Signature · 2 lines
Best, 
Chaoyi
maintainer Reviewed-by
#5 lore raw
Quoted 42 lines · Chaoyi Chen
Quoted 41 lines · Heikki Krogerus
Quoted 40 lines · Chaoyi Chen

Hi Heikki,

Quoted 36 lines · Heikki Krogerus
Quoted 25 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

When TYPEC_DP_ALTMODE is enabled, DRM_AUX_HPD_BRIDGE is most likely also needed for embedded platforms. Select it when available.

---
Changes in v3:
- Link to v2: https://lore.kernel.org/all/[email protected]/
- Use the same "select" as v1 to make things simple.

Changes in v2:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Change "select" to "imply".
---

 drivers/usb/typec/altmodes/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/altmodes/Kconfig +0 -0
index 7867fa7c405d..b054c0b6a8d4 100644

drivers/usb/typec/altmodes/Kconfig menu "USB Type-C Alternate Mode drivers" · line 8

Quoted 4 lines
drivers/usb/typec/altmodes/Kconfig +1 -0
@@ -5,6 +5,7 @@ menu "USB Type-C Alternate Mode drivers"
 config TYPEC_DP_ALTMODE
 	tristate "DisplayPort Alternate Mode driver"
 	depends on DRM
+	select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF

Is there really no way of making this into a dependency? Doesn't this, or something like it not work:

        depends on (DRM_AUX_HPD_BRIDGE && DRM_BRIDGE && OF) || !DRM_AUX_HPD_BRIDGE
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I think Xu originally wanted to select this item directly, since it wasn't visible in the menu and there was nowhere to select it on some platforms.

But now it is user selectable, no?

No, currently it needs to be explicitly selected in Kconfig, and it is not visible to the user.

Okay, yet another Kconfig option with dependencies that's not user selectable. Meaning, everything that selects that option has to carry the same dependencies, and hope that if those dependencies ever change they are updated everywhere. :(

I still don't like this at all, but let's go with it for now.

Thanks,

Signature · 1 line
heikki