Message ID | 20230629081116.919253-1-sakari.ailus@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] media: i2c: Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for sensors | expand |
Hi Sakari, On 6/29/23 10:11, 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. > > Reported-by: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> 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 > --- > 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..1d64b8a94b955 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 > + 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, On Thu, Jun 29, 2023 at 12:11:01PM +0200, Hans de Goede wrote: > Hi Sakari, > > On 6/29/23 10:11, 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. > > > > Reported-by: Hans de Goede <hdegoede@redhat.com> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > 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 ? 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.
Hi, On 6/29/23 12:22, Sakari Ailus wrote: > Hi Hans, > > On Thu, Jun 29, 2023 at 12:11:01PM +0200, Hans de Goede wrote: >> Hi Sakari, >> >> On 6/29/23 10:11, 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. >>> >>> Reported-by: Hans de Goede <hdegoede@redhat.com> >>> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> >> >> 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 ? > > 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. > I forgot MEDIA_CONTROLLER now can be selected, it's not something to depend > on anymore. Ack. Regards, Hans
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 815c83135021c..1d64b8a94b955 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 + 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
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. Reported-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/i2c/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)