Re: [PATCH v5 2/2] media: i2c: add ov2735 image sensor driver
From: Hardevsinh Palaniya
Date: Tue Jul 29 2025 - 02:35:41 EST
Hi Andy,
I’ve made all the corrections as per your comments; only one point is pending.
Please see below.
> > On Thu, Jul 24, 2025 at 04:17:05PM +0530, Hardevsinh Palaniya wrote:
> > > Add a v4l2 subdevice driver for the Omnivision OV2735 sensor.
> > >
> > > The Omnivision OV2735 is a 1/2.7-Inch CMOS image sensor with an
> > > active array size of 1920 x 1080.
> > >
> > > The following features are supported:
> > > - Manual exposure an gain control support
> > > - vblank/hblank control support
> > > - Test pattern support control
> > > - Supported resolution: 1920 x 1080 @ 30fps (SGRBG10)
> >
> > ...
> >
> > > MAINTAINERS | 9 +
> >
> > This should be started as part of patch 1 as in between you will have a
> > dangling file, which is not recorded in MAINTAINERS.
> >
> > ...
> >
> > > + * Inspired from ov8858, imx219, imx283 camera drivers
> >
> > Missing period at the end.
> >
> > ...
> >
> > > +#include <linux/array_size.h>
> >
> > + bitops.h
>
> Why??
>
> > > +#include <linux/clk.h>
> > > +#include <linux/container_of.h>
> > > +#include <linux/delay.h>
> > > +#include <linux/device/devres.h>
> > > +#include <linux/err.h>
> > > +#include <linux/gpio/consumer.h>
> > > +#include <linux/i2c.h>
> > > +#include <linux/module.h>
> > > +#include <linux/mutex.h>
> > > +#include <linux/pm_runtime.h>
> > > +#include <linux/property.h>
> > > +#include <linux/regulator/consumer.h>
> > > +#include <linux/units.h>
> > > +#include <linux/types.h>
> >
> > > +#include <vdso/time64.h>
> >
> > We do not include vdso in the (regular) drivers. Use linux/time.h.
> >
> > ...
> >
> > > +struct ov2735 {
> > > + struct device *dev;
> >
> > Do you need this? Can't it be derived from regmap cci below?
>
> I prefer keeping the dev pointer directly in the struct for simplicity
> and better readability. Using regmap_get_device(ov2735->cci) adds an
> unnecessary level of indirection, especially since dev is frequently
> used for logging, error handling, and regulator/device tree access.
> I would prefer to retain it.
Are you okay with this approach, or do you still prefer to remove it?
Best Regards,
Hardev