Re: [PATCH 02/11] media: i2c: ov5640: Set exposure minimum and defaults

From: Jacopo Mondi

Date: Thu May 14 2026 - 04:01:22 EST


On Thu, May 14, 2026 at 09:58:43AM +0200, Jacopo Mondi wrote:
> Hi Kieran
>
> On Fri, May 01, 2026 at 04:39:04PM +0100, Kieran Bingham wrote:
> > A zero exposure would be a fully black image and not useful as a sensor.
> > Increase the minimum and default control values to sane parameters.
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx>
> > ---
> > drivers/media/i2c/ov5640.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index 01ea6b2bfeeb..b5e529ea662b 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -3479,7 +3479,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
> > V4L2_EXPOSURE_MANUAL, 0,
> > V4L2_EXPOSURE_AUTO);
> > ctrls->exposure = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_EXPOSURE,
> > - 0, 65535, 1, 0);
> > + 4, 65535, 1, 1000);
>
> Where does 1000 come from ? The register default is 512, should we use
> that value ?
>
> Also, is the 4 lines step value correct ?

Sorry, this is the minimum of course. How did you pick 4 ?


>
> > /* Auto/manual gain */
> > ctrls->auto_gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_AUTOGAIN,
> > 0, 1, 1, 1);
> >
> > --
> > 2.52.0
> >
> >