summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLiu Ying <b17645@freescale.com>2011-01-10 18:39:52 +0800
committerLiu Ying <b17645@freescale.com>2011-01-11 12:43:19 +0800
commit90fdf1cded2ce26ac6e8c81944a78a3f998ddaf2 (patch)
tree9d0e0c5ca0635f0f9536162076e39de33ebdc3b3 /drivers
parent3dd91a35a55263252ab5d4bb63762713c138b567 (diff)
ENGR00137783-1 MXC V4L2 capture:Add several ioctrl support
This patch supports VIDIOC_ENUM_FMT, VIDIOC_ENUM_FRAMESIZES and VIDIOC_DBG_G_CHIP_IDENT ioctrls. Signed-off-by: Liu Ying <b17645@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index de0c57fb7850..5af7bbfc9c23 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -33,6 +33,7 @@
#include <linux/fb.h>
#include <linux/dma-mapping.h>
#include <linux/mxcfb.h>
+#include <media/v4l2-chip-ident.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-int-device.h>
#include "mxc_v4l2_capture.h"
@@ -2100,8 +2101,23 @@ static long mxc_v4l_do_ioctl(struct file *file,
cam->current_input = *index;
break;
}
-
- case VIDIOC_ENUM_FMT:
+ case VIDIOC_ENUM_FMT: {
+ struct v4l2_fmtdesc *f = arg;
+ retval = vidioc_int_enum_fmt_cap(cam->sensor, f);
+ break;
+ }
+ case VIDIOC_ENUM_FRAMESIZES: {
+ struct v4l2_frmsizeenum *fsize = arg;
+ retval = vidioc_int_enum_framesizes(cam->sensor, fsize);
+ break;
+ }
+ case VIDIOC_DBG_G_CHIP_IDENT: {
+ struct v4l2_dbg_chip_ident *p = arg;
+ p->ident = V4L2_IDENT_NONE;
+ p->revision = 0;
+ retval = vidioc_int_g_chip_ident(cam->sensor, (int *)p);
+ break;
+ }
case VIDIOC_TRY_FMT:
case VIDIOC_QUERYCTRL:
case VIDIOC_G_TUNER: