[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xaejexfyvesftglbdyllzrz5nlibzcj3poddczgrqhrm7ugh3l@tysxjhoksvz7>
Date: Wed, 3 Sep 2025 10:24:46 +0200
From: Richard Leitner <richard.leitner@...ux.dev>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Dave Stevenson <dave.stevenson@...pberrypi.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>, linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-leds@...r.kernel.org, Hans Verkuil <hverkuil@...nel.org>
Subject: Re: [PATCH v7 10/10] media: i2c: ov9282: dynamic flash_duration
maximum
Hi Sakari,
On Wed, Sep 03, 2025 at 10:48:48AM +0300, Sakari Ailus wrote:
> Hi Richard,
>
> On Wed, Sep 03, 2025 at 09:13:35AM +0200, Richard Leitner wrote:
> > > > @@ -1491,8 +1510,11 @@ static int ov9282_init_controls(struct ov9282 *ov9282)
> > > > /* Flash/Strobe controls */
> > > > v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops, V4L2_CID_FLASH_HW_STROBE_SIGNAL, 0, 1, 1, 0);
> > > >
> > > > - v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > > > - 0, 13900, 1, 8);
> > > > + exposure_us = ov9282_exposure_to_us(ov9282, OV9282_EXPOSURE_DEFAULT);
> > > > + ov9282->flash_duration = v4l2_ctrl_new_std(ctrl_hdlr,
> > > > + &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > > > + 0, exposure_us,
> > > > + 1, OV9282_FLASH_DURATION_DEFAULT);
> > >
> > > Wrap this differently, please, e.g. after '='.
> >
> > This is wrapped the same way as all other v4l2_ctrl_new_X() calls in
> > ov9282_init_controls(). Therefore I've chosen to do it this way here
> > too.
> >
> > So if I'm going to change this one, IMHO all others should be changed
> > too (exp_ctrl, again_ctrl, vblank_ctrl, pixel_rate, link_freq_ctrl,
> > hblank_ctrl). Is this intended?
> >
> > If so I'm wondering if this would be a suiteable approach?
> >
> > ov9282->flash_duration =
> > v4l2_ctrl_new_std(ctrl_hdlr,
> > &ov9282_ctrl_ops, V4L2_CID_FLASH_DURATION,
> > 0, exposure_us,
> > 1, OV9282_FLASH_DURATION_DEFAULT);
> >
> > It is fine for checkpatch, but introduces a newline for every ctrl and
> > tbh I'm not sure if it improves readability?
>
> I don't think it's worse at least. You can also rewrap the rest of the
> lines:
>
> ov9282->flash_duration =
> v4l2_ctrl_new_std(ctrl_hdlr, &ov9282_ctrl_ops,
> V4L2_CID_FLASH_DURATION, 0, exposure_us, 1,
> OV9282_FLASH_DURATION_DEFAULT);
>
Ok. Fine with me ;)
So I will adapt this patch and add a new patch which changes the wrapping
for all remaining v4l2_ctrl_new_X() calls in ov9282_init_controls() to the
series and send a v8? Or should I wait for feedback from Laurent for v8?
> > > > ctrl = v4l2_ctrl_new_std_menu(ctrl_hdlr, &ov9282_ctrl_ops,
> > > > V4L2_CID_FLASH_STROBE_SOURCE,
> > > >
> > >
> > > To me the set looks good but I wouldn't mind about having a bit more
> > > review.
> >
> > Thanks for your continuous feedback! It improved the series a lot!
> >
> > Is there anyhthing I can assists/help?
>
> I asked Laurent if he could check this out, it'd be nice to get these to
> 6.18.
Nice. Thanks! Yeah, that would be nice, indeed :)
>
> --
> Kind regards,
>
> Sakari Ailus
regards;rl
Powered by blists - more mailing lists