ov5645: Implement VIDIOC_QUERYCTRL ioctl
b/128424247
Change-Id: I3182ac69f96e60e08693abd1685f054c097c631f
diff --git a/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c b/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
index 152e8a0..ced8b2e 100644
--- a/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
+++ b/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
@@ -3280,6 +3280,11 @@
return 0;
}
+static int ov5645_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
+{
+ return -EINVAL;
+}
+
/*!
* ov5645_enum_frameintervals - V4L2 sensor interface handler for
* VIDIOC_ENUM_FRAMEINTERVALS ioctl
@@ -3391,6 +3396,7 @@
.g_register = ov5645_get_register,
.s_register = ov5645_set_register,
#endif
+ .queryctrl = ov5645_queryctrl,
};
static struct v4l2_subdev_ops ov5645_subdev_ops = {
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 9102d6c..aac240b 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -171,6 +171,8 @@
* @s_gpio: set GPIO pins. Very simple right now, might need to be extended with
* a direction argument if needed.
*
+ * @queryctrl: callback for VIDIOC_QUERYCTL ioctl handler code.
+ *
* @ioctl: called at the end of ioctl() syscall handler at the V4L2 core.
* used to provide support for private ioctls used on the driver.
*
@@ -202,6 +204,7 @@
int (*load_fw)(struct v4l2_subdev *sd);
int (*reset)(struct v4l2_subdev *sd, u32 val);
int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
+ int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
#ifdef CONFIG_COMPAT
long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd,