aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-12-11 09:14:46 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-16 06:27:13 -0500
commit325361088b73269f4cc96256276a142addbf3454 (patch)
tree6a18f4b10d1df53bfae4a773480fdadfad587b62 /drivers/media/video/pxa_camera.c
parent11e3d1adbe0246fc8d6c06f7e42aff5bead25670 (diff)
V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use g_skip_top_lines in soc-camera
Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and .enum_frameintervals() methods to it, add a new .g_skip_top_lines() method and switch soc-camera to use it instead of .y_skip_top soc_camera_device member, which can now be removed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r--drivers/media/video/pxa_camera.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 51b683c63b70..4df09a693ec7 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1051,8 +1051,13 @@ static void pxa_camera_setup_cicr(struct soc_camera_device *icd,
1051{ 1051{
1052 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); 1052 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
1053 struct pxa_camera_dev *pcdev = ici->priv; 1053 struct pxa_camera_dev *pcdev = ici->priv;
1054 struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
1054 unsigned long dw, bpp; 1055 unsigned long dw, bpp;
1055 u32 cicr0, cicr1, cicr2, cicr3, cicr4 = 0; 1056 u32 cicr0, cicr1, cicr2, cicr3, cicr4 = 0, y_skip_top;
1057 int ret = v4l2_subdev_call(sd, sensor, g_skip_top_lines, &y_skip_top);
1058
1059 if (ret < 0)
1060 y_skip_top = 0;
1056 1061
1057 /* Datawidth is now guaranteed to be equal to one of the three values. 1062 /* Datawidth is now guaranteed to be equal to one of the three values.
1058 * We fix bit-per-pixel equal to data-width... */ 1063 * We fix bit-per-pixel equal to data-width... */
@@ -1118,7 +1123,7 @@ static void pxa_camera_setup_cicr(struct soc_camera_device *icd,
1118 1123
1119 cicr2 = 0; 1124 cicr2 = 0;
1120 cicr3 = CICR3_LPF_VAL(icd->user_height - 1) | 1125 cicr3 = CICR3_LPF_VAL(icd->user_height - 1) |
1121 CICR3_BFW_VAL(min((unsigned short)255, icd->y_skip_top)); 1126 CICR3_BFW_VAL(min((u32)255, y_skip_top));
1122 cicr4 |= pcdev->mclk_divisor; 1127 cicr4 |= pcdev->mclk_divisor;
1123 1128
1124 __raw_writel(cicr1, pcdev->base + CICR1); 1129 __raw_writel(cicr1, pcdev->base + CICR1);