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.
-- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html