Re: [PATCH v3 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

From: Sergey Lebedev

Date: Mon Nov 09 2026 - 07:48:03 EST


Hi Sakari,

Thank you for the quick and thorough review. I am working on v4 with
the rest of your comments, which will take a few days. Two points
first, as your answers may change the code.

On Mon, Nov 09, 2026 at 01:36:37PM +0200, Sakari Ailus wrote:
>> +static const s64 vd55g0_ev_bias_menu[] = {
>> + -3000, -2500, -2000, -1500, -1000, -500,
>> + 0,
>> + 500, 1000, 1500, 2000, 2500, 3000,
>
> Is this

The sentence seems to have been cut off here. What did you mean? The
table is vd55g1's, in the control's 0.001 EV units.

>> + if (!ret) {
>> + sensor->expo_ctrl->val = expo;
>> + sensor->again_ctrl->val = again;
>> + sensor->dgain_ctrl->val = dgain;
>
> Can you use __v4l2_ctrl_s_ctrl()? That way events get handled correctly.

These three are volatile while auto exposure is on, which is the only
time g_volatile_ctrl() is called. v4l2-controls.rst says to set
ctrl->val there, and that a volatile control does not generate
V4L2_EVENT_CTRL_CH_VALUE; cluster_changed() skips volatile controls, so
__v4l2_ctrl_s_ctrl() would not send one either. Did I miss a case?

Sergey