Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
@ 2023-06-29 12:26 Sakari Ailus
  2023-06-29 15:03 ` Hans de Goede
  2023-06-29 16:18 ` Laurent Pinchart
  0 siblings, 2 replies; 5+ messages in thread
From: Sakari Ailus @ 2023-06-29 12:26 UTC (permalink / raw)
  To: linux-media; +Cc: Hans de Goede, Laurent Pinchart, Dan Scally, hverkuil

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>
---
since v1:

- Select MEDIA_CONTROLLER, don't depend on it.

 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 815c83135021c..c7ffaa79abeb9 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
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
  2023-06-29 12:26 [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors Sakari Ailus
@ 2023-06-29 15:03 ` Hans de Goede
  2023-06-29 16:18 ` Laurent Pinchart
  1 sibling, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2023-06-29 15:03 UTC (permalink / raw)
  To: Sakari Ailus, linux-media; +Cc: Laurent Pinchart, Dan Scally, hverkuil

Hi,

On 6/29/23 14:26, 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>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans




> ---
> since v1:
> 
> - Select MEDIA_CONTROLLER, don't depend on it.
> 
>  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 815c83135021c..c7ffaa79abeb9 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
  2023-06-29 12:26 [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors Sakari Ailus
  2023-06-29 15:03 ` Hans de Goede
@ 2023-06-29 16:18 ` Laurent Pinchart
  2023-06-29 16:23   ` Laurent Pinchart
  1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2023-06-29 16:18 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, Hans de Goede, Dan Scally, hverkuil

Hi Sakari,

Thank you for the patch.

On Thu, Jun 29, 2023 at 03:26:48PM +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>
> ---
> since v1:
> 
> - Select MEDIA_CONTROLLER, don't depend on it.
> 
>  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 815c83135021c..c7ffaa79abeb9 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

Shouldn't you then remove the MEDIA_CONTROLLER, V4L2_FWNODE and
VIDEO_V4L2_SUBDEV_API selection from individual drivers' Kconfig entries
?

>  
>  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

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
  2023-06-29 16:18 ` Laurent Pinchart
@ 2023-06-29 16:23   ` Laurent Pinchart
  2023-06-29 17:19     ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2023-06-29 16:23 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, Hans de Goede, Dan Scally, hverkuil

On Thu, Jun 29, 2023 at 07:18:29PM +0300, Laurent Pinchart wrote:
> Hi Sakari,
> 
> Thank you for the patch.
> 
> On Thu, Jun 29, 2023 at 03:26:48PM +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>
> > ---
> > since v1:
> > 
> > - Select MEDIA_CONTROLLER, don't depend on it.
> > 
> >  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 815c83135021c..c7ffaa79abeb9 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
> 
> Shouldn't you then remove the MEDIA_CONTROLLER, V4L2_FWNODE and
> VIDEO_V4L2_SUBDEV_API selection from individual drivers' Kconfig entries
> ?

I've read your reply to Hans in v1. I'm fine doing it in a separate
patch, but could it be bundled in the same series ?

> >  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

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors
  2023-06-29 16:23   ` Laurent Pinchart
@ 2023-06-29 17:19     ` Sakari Ailus
  0 siblings, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2023-06-29 17:19 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, Hans de Goede, Dan Scally, hverkuil

Hi Laurent,

On Thu, Jun 29, 2023 at 07:23:30PM +0300, Laurent Pinchart wrote:
> On Thu, Jun 29, 2023 at 07:18:29PM +0300, Laurent Pinchart wrote:
> > Hi Sakari,
> > 
> > Thank you for the patch.
> > 
> > On Thu, Jun 29, 2023 at 03:26:48PM +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>
> > > ---
> > > since v1:
> > > 
> > > - Select MEDIA_CONTROLLER, don't depend on it.
> > > 
> > >  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 815c83135021c..c7ffaa79abeb9 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
> > 
> > Shouldn't you then remove the MEDIA_CONTROLLER, V4L2_FWNODE and
> > VIDEO_V4L2_SUBDEV_API selection from individual drivers' Kconfig entries
> > ?
> 
> I've read your reply to Hans in v1. I'm fine doing it in a separate
> patch, but could it be bundled in the same series ?

Sure. I'll add cc to stable --- I have opes it applies to at least most
recent stable trees. As this hasn't been reported until now, I wouldn't
really worry the earlier ones.

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-29 17:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29 12:26 [PATCH v2 1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors Sakari Ailus
2023-06-29 15:03 ` Hans de Goede
2023-06-29 16:18 ` Laurent Pinchart
2023-06-29 16:23   ` Laurent Pinchart
2023-06-29 17:19     ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox