Re: [PATCH v7] media: i2c: add support for omnivision's ov2659 sensor

From: Lad, Prabhakar
Date: Thu Mar 19 2015 - 05:40:47 EST


Hi Sakari,

Thanks for the review.

On Wed, Mar 18, 2015 at 10:13 PM, Sakari Ailus
<sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> Hi Prabhakar,
>
> Lad Prabhakar wrote:
> ...
>>
>> +static int ov2659_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>> +{
>> + struct ov2659 *ov2659 =
>> + container_of(ctrl->handler, struct ov2659, ctrls);
>> + struct v4l2_mbus_framefmt *fmt = &ov2659->format;
>> +
>> + switch (ctrl->id) {
>> + case V4L2_CID_PIXEL_RATE:
>> + if (fmt->code != MEDIA_BUS_FMT_SBGGR8_1X8)
>> + ov2659->link_frequency->val =
>> + ov2659->pdata->link_frequency / 2;
>> + else
>> + ov2659->link_frequency->val =
>> + ov2659->pdata->link_frequency;
>
>
> You should simply use v4l2_ctrl_s_ctrl_int64() in ..._set_fmt() as this
> isn't really a proper volatile control, but its value depends on the format.
>
Yea makes sense, will respin the patch with this change.

Cheers,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/