Skip to content

Commit 347f7a3

Browse files
committed
[media] subdev autoselect only works if I2C and I2C_MUX is selected
As reported by the kbuild test robot <[email protected]>: > warning: (VIDEO_EM28XX_DVB) selects DVB_M88DS3103 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX) > drivers/built-in.o: In function `m88ds3103_release': > >> m88ds3103.c:(.text+0x1ab1af): undefined reference to `i2c_del_mux_adapter' > drivers/built-in.o: In function `m88ds3103_attach': > >> (.text+0x1ab342): undefined reference to `i2c_add_mux_adapter' There are 3 possible ways to fix it: 1) make em28xx dependent on I2C_MUX. That sounds wrong, as the em28xx bridge doesn't have i2c muxes on it, and just one frontend has. Well, subdevs could eventually be converted to, instead of using dvb i2c gate control, to use i2c mux support. That makes sense, but it takes time and lots of effort. Not sure if this will happen anytime soon. 2) MEDIA_SUBDRV_AUTOSELECT can be dependent of I2C and I2C_MUX. That means that users will need to manually enable I2C_MUX on some distributions. Not sure about others, but, on Fedora, this option is disabled. So, it can end by generating a number of complains from users that their devices suddenly stopped working after a Kernel upgrade, at least until all distros that ship Kernels with I2C_MUX enabled. 3) if MEDIA_SUBDRV_AUTOSELECT is selected, it will select I2C and I2C_MUX. Of course, MEDIA_SUBDRV_AUTOSELECT will need to inherit all dependencies that I2C and I2C_MUX have (only HAS_IOMEM). The disadvantage is that, if new dependencies are added on I2C, they'll also need to be added here. As the hole idea of autoselect is to let the user not bother about whatever frontend/tuner is used by a driver, IMHO, (3) is the better solution. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent c57f87e commit 347f7a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/media/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ comment "Media ancillary drivers (tuners, sensors, i2c, frontends)"
172172
config MEDIA_SUBDRV_AUTOSELECT
173173
bool "Autoselect ancillary drivers (tuners, sensors, i2c, frontends)"
174174
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT
175+
depends on HAS_IOMEM
176+
select I2C
177+
select I2C_MUX
175178
default y
176179
help
177180
By default, a media driver auto-selects all possible ancillary

0 commit comments

Comments
 (0)