Skip to contentSkip to conversation

phy: google: fix build dependency for Google Tensor USB PHY

PATCH In review Roy Luo 3 participants 3 messages Jan 28 – Feb 4

Subsystems (2)
lore
Share & tools
lore

Roy Luo

author
#0 lore raw

PATCH v2 1/1 phy: google: fix build dependency for Google Tensor USB PHY

The Google Tensor USB PHY driver uses the Type-C switch framework to handle orientation changes. However, the Kconfig did not specify a dependency on the TYPEC framework, leading to undefined reference errors when building for architectures or configurations where CONFIG_TYPEC is configured as a module while CONFIG_PHY_GOOGLE_USB is configured as built-in.

Add 'depends on TYPEC' to the PHY_GOOGLE_USB entry to ensure all required symbols are available during linking, and 'COMPILE_TEST' to expand test coverage.

---
Changes in v2:
- Add '(TYPEC=n && COMPILE_TEST)' to build dependency to expand test coverage as suggested by André Draszik <[email protected]>
- Keep Peter's Reviewed-by tag because the change suggested by André is a trivial improvement.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index 142e7b0ef2efb9209781800ee47b820a91b115ae..29953c911deda5fd3c43aef6da28d96954a22f8d 100644
@@ -49,6 +49,7 @@ config GENERIC_PHY_MIPI_DPHY
 
 config PHY_GOOGLE_USB
 	tristate "Google Tensor SoC USB PHY driver"
+	depends on TYPEC || (TYPEC=n && COMPILE_TEST)
 	select GENERIC_PHY
 	help
 	  Enable support for the USB PHY on Google Tensor SoCs, starting with

---
base-commit: 8bb92fd7a04077925c8330f46a6ab44c80ca59f4
change-id: 20260121-next-b949189cacf4

Best regards,

Signature · 1 line
Roy Luo <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 25 lines · Roy Luo

The Google Tensor USB PHY driver uses the Type-C switch framework to handle orientation changes. However, the Kconfig did not specify a dependency on the TYPEC framework, leading to undefined reference errors when building for architectures or configurations where CONFIG_TYPEC is configured as a module while CONFIG_PHY_GOOGLE_USB is configured as built-in.

Add 'depends on TYPEC' to the PHY_GOOGLE_USB entry to ensure all required symbols are available during linking, and 'COMPILE_TEST' to expand test coverage.

---
Changes in v2:
- Add '(TYPEC=n && COMPILE_TEST)' to build dependency to expand test coverage as suggested by André Draszik <[email protected]>
- Keep Peter's Reviewed-by tag because the change suggested by André is a trivial improvement.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
 drivers/phy/Kconfig | 1 +

Quoted 1 line
 1 file changed, 1 insertion(+)
maintainer
#2 lore raw
In reply to Roy Luo
Quoted 10 lines · Roy Luo

The Google Tensor USB PHY driver uses the Type-C switch framework to handle orientation changes. However, the Kconfig did not specify a dependency on the TYPEC framework, leading to undefined reference errors when building for architectures or configurations where CONFIG_TYPEC is configured as a module while CONFIG_PHY_GOOGLE_USB is configured as built-in.

Add 'depends on TYPEC' to the PHY_GOOGLE_USB entry to ensure all required symbols are available during linking, and 'COMPILE_TEST' to expand test coverage.

Thanks for the fix, looking at three patches for this, I like Arnd's fix better and have applied that now

Signature · 1 line
~Vinod