media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
PATCH 1/1 media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for all sensor drivers. This also adds the options to drivers that don't specifically need them, these are still seldom used drivers using old APIs. The upside is that these should now all compile --- many drivers have had missing dependencies.
The "menu" is replaced by selectable "menuconfig" to select the needed V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API options.
--- drivers/media/i2c/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/media/i2c/Kconfig +10 -3
@@ -25,8 +25,15 @@ config VIDEO_IR_I2C # V4L2 I2C drivers that are related with Camera support # -menu "Camera sensor devices" - visible if MEDIA_CAMERA_SUPPORT +menuconfig VIDEO_CAMERA_SENSOR + bool "Camera sensor devices" + depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER + select V4L2_FWNODE + select VIDEO_V4L2_SUBDEV_API + default y + +if VIDEO_CAMERA_SENSOR config VIDEO_APTINA_PLL tristate
@@ -810,7 +817,7 @@ config VIDEO_ST_VGXY61 source "drivers/media/i2c/ccs/Kconfig" source "drivers/media/i2c/et8ek8/Kconfig" -endmenu +endif menu "Lens drivers" visible if MEDIA_CAMERA_SUPPORT
Signature · 1 line
2.39.2
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Sakari,
kernel test robot noticed the following build errors:
[auto build test ERROR on media-tree/master]
[also build test ERROR on sailus-media-tree/streams linus/master v6.4 next-20230629] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sakari-Ailus/media-i2c-Select-V4L2_FWNODE-and-VIDEO_V4L2_SUBDEV_API-for-sensors/20230629-162047 base: git://linuxtv.org/media_tree.git master patch link: https://lore.kernel.org/r/20230629081116.919253-1-sakari.ailus%40linux.intel.com patch subject: [PATCH 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors config: riscv-allnoconfig (attached as .config) compiler: riscv64-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230629/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/media/i2c/Kconfig:28:error: recursive dependency detected!
drivers/media/i2c/Kconfig:28: symbol VIDEO_CAMERA_SENSOR depends on MEDIA_CONTROLLER
drivers/media/Kconfig:170: symbol MEDIA_CONTROLLER is selected by VIDEO_AR0521
drivers/media/i2c/Kconfig:44: symbol VIDEO_AR0521 depends on VIDEO_CAMERA_SENSOR
For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations"
vim +28 drivers/media/i2c/Kconfig
27
> 28 menuconfig VIDEO_CAMERA_SENSOR
29 bool "Camera sensor devices"
30 depends on MEDIA_CAMERA_SUPPORT
31 depends on MEDIA_CONTROLLER
32 select V4L2_FWNODE
33 select VIDEO_V4L2_SUBDEV_API
34 default y
35 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Sakari,
kernel test robot noticed the following build errors:
[auto build test ERROR on media-tree/master]
[also build test ERROR on sailus-media-tree/streams linus/master v6.4 next-20230629] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sakari-Ailus/media-i2c-Select-V4L2_FWNODE-and-VIDEO_V4L2_SUBDEV_API-for-sensors/20230629-162047 base: git://linuxtv.org/media_tree.git master patch link: https://lore.kernel.org/r/20230629081116.919253-1-sakari.ailus%40linux.intel.com patch subject: [PATCH 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors config: hexagon-randconfig-r045-20230629 (attached as .config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230629/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/media/i2c/Kconfig:28:error: recursive dependency detected!
drivers/media/i2c/Kconfig:28: symbol VIDEO_CAMERA_SENSOR depends on MEDIA_CONTROLLER
drivers/media/Kconfig:170: symbol MEDIA_CONTROLLER is selected by VIDEO_AR0521
drivers/media/i2c/Kconfig:44: symbol VIDEO_AR0521 depends on VIDEO_CAMERA_SENSOR
For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations"
vim +28 drivers/media/i2c/Kconfig
27
> 28 menuconfig VIDEO_CAMERA_SENSOR
29 bool "Camera sensor devices"
30 depends on MEDIA_CAMERA_SUPPORT
31 depends on MEDIA_CONTROLLER
32 select V4L2_FWNODE
33 select VIDEO_V4L2_SUBDEV_API
34 default y
35 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Sakari,
Quoted 10 lines · Sakari Ailus
Select
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIfor all sensor drivers. This also adds the options to drivers that don't specifically need them, these are still seldom used drivers using old APIs. The upside is that these should now all compile --- many drivers have had missing dependencies.The "menu" is replaced by selectable "menuconfig" to select the needed
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIoptions.Reported-by Hans de Goede <[email protected]>Signed-off-by Sakari Ailus <[email protected]>
Thank you for working on this. This looks good to me, but shouldn't
all the existing sensor Kconfig bits then have their depends on MEDIA_CAMERA_SUPPORT / MEDIA_CONTROLLER and select V4L2_FWNODE / VIDEO_V4L2_SUBDEV_API bits dropped ?
Regards,
Hans
Quoted 35 lines
--- drivers/media/i2c/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)drivers/media/i2c/Kconfig +10
-3@@ -25,8 +25,15 @@ config VIDEO_IR_I2C # V4L2 I2C drivers that are related with Camera support # -menu "Camera sensor devices" - visible if MEDIA_CAMERA_SUPPORT +menuconfig VIDEO_CAMERA_SENSOR + bool "Camera sensor devices" + depends on MEDIA_CAMERA_SUPPORT + depends on MEDIA_CONTROLLER + select V4L2_FWNODE + select VIDEO_V4L2_SUBDEV_API + default y + +if VIDEO_CAMERA_SENSOR config VIDEO_APTINA_PLL tristate@@ -810,7 +817,7 @@ config VIDEO_ST_VGXY61 source "drivers/media/i2c/ccs/Kconfig" source "drivers/media/i2c/et8ek8/Kconfig" -endmenu +endif menu "Lens drivers" visible if MEDIA_CAMERA_SUPPORT
Hi Hans,
Quoted 11 lines · Hans de Goede
Hi Sakari,
Quoted 8 lines · Sakari Ailus
Select
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIfor all sensor drivers. This also adds the options to drivers that don't specifically need them, these are still seldom used drivers using old APIs. The upside is that these should now all compile --- many drivers have had missing dependencies.The "menu" is replaced by selectable "menuconfig" to select the needed
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIoptions.
Quoted 7 lines
Quoted 2 lines
Reported-by Hans de Goede <[email protected]>Signed-off-by Sakari Ailus <[email protected]>Thank you for working on this. This looks good to me, but shouldn't
all the existing sensorKconfigbits then have their depends onMEDIA_CAMERA_SUPPORT/MEDIA_CONTROLLERand selectV4L2_FWNODE/VIDEO_V4L2_SUBDEV_APIbits dropped ?
Yes. I thought of doing that in a separate patch while this one could be backported independently of any added sensor drivers.
I forgot MEDIA_CONTROLLER now can be selected, it's not something to depend on anymore.
Signature · 3 lines
Regards, Sakari Ailus
Hi,
Quoted 17 lines · Sakari Ailus
Hi Hans,
Quoted 14 lines · Hans de Goede
Hi Sakari,
Quoted 10 lines · Sakari Ailus
Select
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIfor all sensor drivers. This also adds the options to drivers that don't specifically need them, these are still seldom used drivers using old APIs. The upside is that these should now all compile --- many drivers have had missing dependencies.The "menu" is replaced by selectable "menuconfig" to select the needed
V4L2_FWNODEandVIDEO_V4L2_SUBDEV_APIoptions.Reported-by Hans de Goede <[email protected]>Signed-off-by Sakari Ailus <[email protected]>
Quoted 7 lines
Quoted 4 lines
Thank you for working on this. This looks good to me, but shouldn't
all the existing sensorKconfigbits then have their depends onMEDIA_CAMERA_SUPPORT/MEDIA_CONTROLLERand selectV4L2_FWNODE/VIDEO_V4L2_SUBDEV_APIbits dropped ?Yes. I thought of doing that in a separate patch while this one could be backported independently of any added sensor drivers.
Ok, doing this in a follow up patch sounds good.
Quoted 2 lines
I forgot
MEDIA_CONTROLLERnow can be selected, it's not something to depend on anymore.
Ack.
Regards,
Hans