Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: tc358746: select CONFIG_GENERIC_PHY

The tc358746 driver selects CONFIG_GENERIC_PHY_MIPI_DPHY and links to
that, but this fails when CONFIG_GENERIC_PHY is disabled, because Kbuild
then never enters the drivers/phy directory for building object files:

ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk" [drivers/media/i2c/tc358746.ko] undefined!

Add an explicit 'select GENERIC_PHY' here to ensure that the directory
is entered, and add another dependency on that symbol so make it
more obvious what is going on if another driver has the same problem,
as this will produce a Kconfig warning.

Link: https://lore.kernel.org/linux-media/20230623152318.2276816-1-arnd@kernel.org
Fixes: 80a21da360516 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
582d4ad4 d78b9d66

+2
+1
drivers/media/i2c/Kconfig
··· 1305 1305 select VIDEO_V4L2_SUBDEV_API 1306 1306 select MEDIA_CONTROLLER 1307 1307 select V4L2_FWNODE 1308 + select GENERIC_PHY 1308 1309 select GENERIC_PHY_MIPI_DPHY 1309 1310 select REGMAP_I2C 1310 1311 help
+1
drivers/phy/Kconfig
··· 18 18 19 19 config GENERIC_PHY_MIPI_DPHY 20 20 bool 21 + depends on GENERIC_PHY 21 22 help 22 23 Generic MIPI D-PHY support. 23 24