aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/soc_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-02-09 12:00:30 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:11:00 -0500
commitc9f6ef69865ede81265c808227fc4fe9c925319a (patch)
tree1a148a7711d3fe347339ebf348a4740106a1a638 /drivers/media/video/soc_camera.c
parentd74f841c32f0b00a513d87bba646d019ef7d1f67 (diff)
soc-camera: add support for VIDIOC_S_PARM and VIDIOC_G_PARM ioctls
Just pass VIDIOC_S_PARM and VIDIOC_G_PARM down to host drivers. So far no special handling in soc-camera core. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/soc_camera.c')
-rw-r--r--drivers/media/video/soc_camera.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index b91d568f3ac5..80f6bfa2632b 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -781,6 +781,32 @@ static int soc_camera_s_crop(struct file *file, void *fh,
781 return ret; 781 return ret;
782} 782}
783 783
784static int soc_camera_g_parm(struct file *file, void *fh,
785 struct v4l2_streamparm *a)
786{
787 struct soc_camera_file *icf = file->private_data;
788 struct soc_camera_device *icd = icf->icd;
789 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
790
791 if (ici->ops->get_parm)
792 return ici->ops->get_parm(icd, a);
793
794 return -ENOIOCTLCMD;
795}
796
797static int soc_camera_s_parm(struct file *file, void *fh,
798 struct v4l2_streamparm *a)
799{
800 struct soc_camera_file *icf = file->private_data;
801 struct soc_camera_device *icd = icf->icd;
802 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
803
804 if (ici->ops->set_parm)
805 return ici->ops->set_parm(icd, a);
806
807 return -ENOIOCTLCMD;
808}
809
784static int soc_camera_g_chip_ident(struct file *file, void *fh, 810static int soc_camera_g_chip_ident(struct file *file, void *fh,
785 struct v4l2_dbg_chip_ident *id) 811 struct v4l2_dbg_chip_ident *id)
786{ 812{
@@ -1256,6 +1282,8 @@ static const struct v4l2_ioctl_ops soc_camera_ioctl_ops = {
1256 .vidioc_cropcap = soc_camera_cropcap, 1282 .vidioc_cropcap = soc_camera_cropcap,
1257 .vidioc_g_crop = soc_camera_g_crop, 1283 .vidioc_g_crop = soc_camera_g_crop,
1258 .vidioc_s_crop = soc_camera_s_crop, 1284 .vidioc_s_crop = soc_camera_s_crop,
1285 .vidioc_g_parm = soc_camera_g_parm,
1286 .vidioc_s_parm = soc_camera_s_parm,
1259 .vidioc_g_chip_ident = soc_camera_g_chip_ident, 1287 .vidioc_g_chip_ident = soc_camera_g_chip_ident,
1260#ifdef CONFIG_VIDEO_ADV_DEBUG 1288#ifdef CONFIG_VIDEO_ADV_DEBUG
1261 .vidioc_g_register = soc_camera_g_register, 1289 .vidioc_g_register = soc_camera_g_register,