Skip to content

Commit 871a99f

Browse files
jwrdegoedehverkuil
authored andcommitted
media: i2c: Automatically select common options for lens drivers
In commit 7d3c7d2 ("media: i2c: Add a camera sensor top level menu") a top level menu was added for sensor drivers so that all sensor drivers would depend on I2C and so that MEDIA_CONTROLLER, V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API would be automatically selected for all sensor drivers. All lens drivers must depend on I2C and VIDEO_DEV and must select MEDIA_CONTROLLER, V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API and most already do, but e.g. VIDEO_V4L2_SUBDEV_API is not consistenly selected. Change the "Lens drivers" menu into a menuconfig option with the necessary depends and selects. This ensures that these options are depended on / selected consistently and simplifies the Kconfig snippets for the various lens voice coil drivers. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411061152.VKd9JYpa-lkp@intel.com/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
1 parent 375fc90 commit 871a99f

1 file changed

Lines changed: 12 additions & 26 deletions

File tree

drivers/media/i2c/Kconfig

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -766,24 +766,25 @@ config VIDEO_THP7312
766766

767767
endmenu
768768

769-
menu "Lens drivers"
770-
visible if MEDIA_CAMERA_SUPPORT
769+
menuconfig VIDEO_CAMERA_LENS
770+
bool "Lens drivers"
771+
depends on MEDIA_CAMERA_SUPPORT && I2C
772+
select MEDIA_CONTROLLER
773+
select V4L2_FWNODE
774+
select VIDEO_V4L2_SUBDEV_API
775+
default y
776+
777+
if VIDEO_CAMERA_LENS
771778

772779
config VIDEO_AD5820
773780
tristate "AD5820 lens voice coil support"
774-
depends on GPIOLIB && I2C && VIDEO_DEV
775-
select MEDIA_CONTROLLER
776-
select V4L2_ASYNC
781+
depends on GPIOLIB
777782
help
778783
This is a driver for the AD5820 camera lens voice coil.
779784
It is used for example in Nokia N900 (RX-51).
780785

781786
config VIDEO_AK7375
782787
tristate "AK7375 lens voice coil support"
783-
depends on I2C && VIDEO_DEV
784-
select MEDIA_CONTROLLER
785-
select VIDEO_V4L2_SUBDEV_API
786-
select V4L2_ASYNC
787788
help
788789
This is a driver for the AK7375 camera lens voice coil.
789790
AK7375 is a 12 bit DAC with 120mA output current sink
@@ -792,10 +793,7 @@ config VIDEO_AK7375
792793

793794
config VIDEO_DW9714
794795
tristate "DW9714 lens voice coil support"
795-
depends on GPIOLIB && I2C && VIDEO_DEV
796-
select MEDIA_CONTROLLER
797-
select VIDEO_V4L2_SUBDEV_API
798-
select V4L2_ASYNC
796+
depends on GPIOLIB
799797
help
800798
This is a driver for the DW9714 camera lens voice coil.
801799
DW9714 is a 10 bit DAC with 120mA output current sink
@@ -804,10 +802,6 @@ config VIDEO_DW9714
804802

805803
config VIDEO_DW9719
806804
tristate "DW9719 lens voice coil support"
807-
depends on I2C && VIDEO_DEV
808-
select MEDIA_CONTROLLER
809-
select VIDEO_V4L2_SUBDEV_API
810-
select V4L2_ASYNC
811805
select V4L2_CCI_I2C
812806
help
813807
This is a driver for the DW9719 camera lens voice coil.
@@ -816,10 +810,6 @@ config VIDEO_DW9719
816810

817811
config VIDEO_DW9768
818812
tristate "DW9768 lens voice coil support"
819-
depends on I2C && VIDEO_DEV
820-
select MEDIA_CONTROLLER
821-
select VIDEO_V4L2_SUBDEV_API
822-
select V4L2_FWNODE
823813
help
824814
This is a driver for the DW9768 camera lens voice coil.
825815
DW9768 is a 10 bit DAC with 100mA output current sink
@@ -828,17 +818,13 @@ config VIDEO_DW9768
828818

829819
config VIDEO_DW9807_VCM
830820
tristate "DW9807 lens voice coil support"
831-
depends on I2C && VIDEO_DEV
832-
select MEDIA_CONTROLLER
833-
select VIDEO_V4L2_SUBDEV_API
834-
select V4L2_ASYNC
835821
help
836822
This is a driver for the DW9807 camera lens voice coil.
837823
DW9807 is a 10 bit DAC with 100mA output current sink
838824
capability. This is designed for linear control of
839825
voice coil motors, controlled via I2C serial interface.
840826

841-
endmenu
827+
endif
842828

843829
menu "Flash devices"
844830
visible if MEDIA_CAMERA_SUPPORT

0 commit comments

Comments
 (0)