[1/2] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors

Message ID 20230630140354.111404-2-sakari.ailus@linux.intel.com (mailing list archive)
State Under Review
Delegated to: Sakari Ailus
Headers
Series Move camera sensor dependencies to top level menu |

Commit Message

Sakari Ailus June 30, 2023, 2:03 p.m. UTC
  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.

Also select MEDIA_CONTROLLER which VIDEO_V4L2_SUBDEV_API effectively
depends on.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org # for >= 6.1
---
 drivers/media/i2c/Kconfig | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
  

Comments

Laurent Pinchart July 2, 2023, 2:59 p.m. UTC | #1
Hi Sakari,

Thank you for the patch.

On Fri, Jun 30, 2023 at 05:03:53PM +0300, Sakari Ailus wrote:
> 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.
> 
> Also select MEDIA_CONTROLLER which VIDEO_V4L2_SUBDEV_API effectively
> depends on.
> 
> Reported-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Cc: stable@vger.kernel.org # for >= 6.1

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/i2c/Kconfig | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index 815c83135021..c7ffaa79abeb 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -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
> +	select 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
  

Patch

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 815c83135021..c7ffaa79abeb 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -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
+	select 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