mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
When CONFIG_TYPEC is enabled, but USB_ROLE_SWITCH=m, the anx7625 driver
fails to link as built-in:
aarch64-linux-ld: drivers/gpu/drm/bridge/analogix/anx7625.o: in function `anx7625_i2c_remove':
anx7625.c:(.text+0x6ec): undefined reference to `usb_role_switch_put'
aarch64-linux-ld: drivers/gpu/drm/bridge/analogix/anx7625.o: in function `anx7625_typec_set_status':
anx7625.c:(.text+0x3080): undefined reference to `usb_role_switch_set_role'
aarch64-linux-ld: drivers/gpu/drm/bridge/analogix/anx7625.o: in function `anx7625_i2c_probe':
anx7625.c:(.text+0x5368): undefined reference to `fwnode_usb_role_switch_get'
The problem is that both dependencies are optional in the sense of allowing
the anx7625 driver to call the exported interfaces to be used from a loadable
module, but cannot work for built-in drivers. It would be possible to handle
all nine combinations of the CONFIG_TYPEC and CONFIG_USB_ROLE_SWITCH tristate
options, but that does add a lot of complexity that seems unnecessary when
in reality any user of this driver would have both enabled anyway.
Turn both dependencies into hard 'depends on' here to only allow configurations
where it's possible to actually use them, and remove the misguided IS_REACHABLE()
check that did nothing here.
Fixes: f81455b2d3 ("drm: bridge: anx7625: implement minimal Type-C support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260304083604.724519-1-arnd@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config DRM_ANALOGIX_ANX6345
|
|
tristate "Analogix ANX6345 bridge"
|
|
depends on OF
|
|
select DRM_ANALOGIX_DP
|
|
select DRM_DISPLAY_DP_HELPER
|
|
select DRM_DISPLAY_HELPER
|
|
select DRM_KMS_HELPER
|
|
select REGMAP_I2C
|
|
help
|
|
ANX6345 is an ultra-low power Full-HD DisplayPort/eDP
|
|
transmitter designed for portable devices. The
|
|
ANX6345 transforms the LVTTL RGB output of an
|
|
application processor to eDP or DisplayPort.
|
|
|
|
config DRM_ANALOGIX_ANX78XX
|
|
tristate "Analogix ANX78XX bridge"
|
|
select DRM_ANALOGIX_DP
|
|
select DRM_DISPLAY_DP_HELPER
|
|
select DRM_DISPLAY_HELPER
|
|
select DRM_KMS_HELPER
|
|
select REGMAP_I2C
|
|
help
|
|
ANX78XX is an ultra-low power Full-HD SlimPort transmitter
|
|
designed for portable devices. The ANX78XX transforms
|
|
the HDMI output of an application processor to MyDP
|
|
or DisplayPort.
|
|
|
|
config DRM_ANALOGIX_DP
|
|
tristate
|
|
depends on DRM
|
|
|
|
config DRM_ANALOGIX_ANX7625
|
|
tristate "Analogix Anx7625 MIPI to DP interface support"
|
|
depends on DRM
|
|
depends on OF
|
|
depends on TYPEC
|
|
depends on USB_ROLE_SWITCH
|
|
select DRM_DISPLAY_DP_HELPER
|
|
select DRM_DISPLAY_HDCP_HELPER
|
|
select DRM_DISPLAY_HELPER
|
|
select DRM_DISPLAY_DP_AUX_BUS
|
|
select DRM_MIPI_DSI
|
|
help
|
|
ANX7625 is an ultra-low power 4K mobile HD transmitter
|
|
designed for portable devices. It converts MIPI/DPI to
|
|
DisplayPort1.3 4K.
|