* [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize
@ 2023-11-24 18:49 Tommaso Merciai
2023-11-24 19:02 ` Tommaso Merciai
0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Merciai @ 2023-11-24 18:49 UTC (permalink / raw)
Cc: linuxfancy, laurent.pinchart, Tommaso Merciai, Sakari Ailus,
Steve Longerbeam, Mauro Carvalho Chehab, linux-media,
linux-kernel
After the ov5640 configurations steps let's add v4l2_subdev_init_finalize
that finalizes the initialization of the subdevice.
References:
- https://linuxtv.org/downloads/v4l-dvb-apis/driver-api/v4l2-subdev.html
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
drivers/media/i2c/ov5640.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 3f79a3b77044..338eea802ab8 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3924,6 +3924,12 @@ static int ov5640_probe(struct i2c_client *client)
if (ret)
goto entity_cleanup;
+ ret = v4l2_subdev_init_finalize(&sensor->sd);
+ if (ret < 0) {
+ dev_err(dev, "subdev init error: %d\n", ret);
+ goto entity_cleanup;
+ }
+
ret = ov5640_sensor_resume(dev);
if (ret) {
dev_err(dev, "failed to power on\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize
2023-11-24 18:49 [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize Tommaso Merciai
@ 2023-11-24 19:02 ` Tommaso Merciai
2023-11-24 19:06 ` Laurent Pinchart
0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Merciai @ 2023-11-24 19:02 UTC (permalink / raw)
To: linuxfancy, laurent.pinchart, Sakari Ailus, Steve Longerbeam,
Mauro Carvalho Chehab, linux-media, linux-kernel
Hi,
On Fri, Nov 24, 2023 at 07:49:13PM +0100, Tommaso Merciai wrote:
> After the ov5640 configurations steps let's add v4l2_subdev_init_finalize
> that finalizes the initialization of the subdevice.
>
> References:
> - https://linuxtv.org/downloads/v4l-dvb-apis/driver-api/v4l2-subdev.html
>
> Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
> ---
> drivers/media/i2c/ov5640.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 3f79a3b77044..338eea802ab8 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -3924,6 +3924,12 @@ static int ov5640_probe(struct i2c_client *client)
> if (ret)
> goto entity_cleanup;
>
> + ret = v4l2_subdev_init_finalize(&sensor->sd);
> + if (ret < 0) {
> + dev_err(dev, "subdev init error: %d\n", ret);
> + goto entity_cleanup;
> + }
> +
> ret = ov5640_sensor_resume(dev);
> if (ret) {
> dev_err(dev, "failed to power on\n");
> --
> 2.34.1
>
Ignore this patch please. I forget the cleanup part.
Thanks & regards,
Tommaso
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize
2023-11-24 19:02 ` Tommaso Merciai
@ 2023-11-24 19:06 ` Laurent Pinchart
2023-11-25 9:56 ` Tommaso Merciai
0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2023-11-24 19:06 UTC (permalink / raw)
To: Tommaso Merciai
Cc: linuxfancy, Sakari Ailus, Steve Longerbeam, Mauro Carvalho Chehab,
linux-media, linux-kernel
On Fri, Nov 24, 2023 at 08:02:07PM +0100, Tommaso Merciai wrote:
> On Fri, Nov 24, 2023 at 07:49:13PM +0100, Tommaso Merciai wrote:
> > After the ov5640 configurations steps let's add v4l2_subdev_init_finalize
> > that finalizes the initialization of the subdevice.
> >
> > References:
> > - https://linuxtv.org/downloads/v4l-dvb-apis/driver-api/v4l2-subdev.html
> >
> > Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
> > ---
> > drivers/media/i2c/ov5640.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index 3f79a3b77044..338eea802ab8 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -3924,6 +3924,12 @@ static int ov5640_probe(struct i2c_client *client)
> > if (ret)
> > goto entity_cleanup;
> >
> > + ret = v4l2_subdev_init_finalize(&sensor->sd);
> > + if (ret < 0) {
> > + dev_err(dev, "subdev init error: %d\n", ret);
> > + goto entity_cleanup;
> > + }
> > +
> > ret = ov5640_sensor_resume(dev);
> > if (ret) {
> > dev_err(dev, "failed to power on\n");
>
> Ignore this patch please. I forget the cleanup part.
And you also forgot the conversion to the V4L2 subdev active state API
:-) See commit e8a5b1df000e ("media: i2c: imx219: Use subdev active
state") for an example.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize
2023-11-24 19:06 ` Laurent Pinchart
@ 2023-11-25 9:56 ` Tommaso Merciai
0 siblings, 0 replies; 4+ messages in thread
From: Tommaso Merciai @ 2023-11-25 9:56 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linuxfancy, Sakari Ailus, Steve Longerbeam, Mauro Carvalho Chehab,
linux-media, linux-kernel
Hi Laurent,
On Fri, Nov 24, 2023 at 09:06:36PM +0200, Laurent Pinchart wrote:
> On Fri, Nov 24, 2023 at 08:02:07PM +0100, Tommaso Merciai wrote:
> > On Fri, Nov 24, 2023 at 07:49:13PM +0100, Tommaso Merciai wrote:
> > > After the ov5640 configurations steps let's add v4l2_subdev_init_finalize
> > > that finalizes the initialization of the subdevice.
> > >
> > > References:
> > > - https://linuxtv.org/downloads/v4l-dvb-apis/driver-api/v4l2-subdev.html
> > >
> > > Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
> > > ---
> > > drivers/media/i2c/ov5640.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > > index 3f79a3b77044..338eea802ab8 100644
> > > --- a/drivers/media/i2c/ov5640.c
> > > +++ b/drivers/media/i2c/ov5640.c
> > > @@ -3924,6 +3924,12 @@ static int ov5640_probe(struct i2c_client *client)
> > > if (ret)
> > > goto entity_cleanup;
> > >
> > > + ret = v4l2_subdev_init_finalize(&sensor->sd);
> > > + if (ret < 0) {
> > > + dev_err(dev, "subdev init error: %d\n", ret);
> > > + goto entity_cleanup;
> > > + }
> > > +
> > > ret = ov5640_sensor_resume(dev);
> > > if (ret) {
> > > dev_err(dev, "failed to power on\n");
> >
> > Ignore this patch please. I forget the cleanup part.
>
> And you also forgot the conversion to the V4L2 subdev active state API
> :-) See commit e8a5b1df000e ("media: i2c: imx219: Use subdev active
> state") for an example.
Yup, thanks mb :'(
Thanks for sharing this :)
>
> --
> Regards,
>
> Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-25 9:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24 18:49 [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize Tommaso Merciai
2023-11-24 19:02 ` Tommaso Merciai
2023-11-24 19:06 ` Laurent Pinchart
2023-11-25 9:56 ` Tommaso Merciai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox