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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux