soc-camera: update mt9v022 to take into account board signal routing
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Thu, 4 Feb 2010 10:17:48 +0000 (11:17 +0100)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:59 +0000 (15:10 -0300)
Use soc_camera_apply_sensor_flags() in mt9v022 to account for any inverters in
video signal paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mt9v022.c

index 91df7ec91fb67d06496cc9b0de41bdf1ee15a2c6..1a34d2993e946488e0bad10eae26e3124bcfff78 100644 (file)
@@ -257,19 +257,18 @@ static int mt9v022_set_bus_param(struct soc_camera_device *icd,
 static unsigned long mt9v022_query_bus_param(struct soc_camera_device *icd)
 {
        struct soc_camera_link *icl = to_soc_camera_link(icd);
-       unsigned int width_flag;
+       unsigned int flags = SOCAM_MASTER | SOCAM_SLAVE |
+               SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING |
+               SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW |
+               SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW |
+               SOCAM_DATA_ACTIVE_HIGH;
 
        if (icl->query_bus_param)
-               width_flag = icl->query_bus_param(icl) &
-                       SOCAM_DATAWIDTH_MASK;
+               flags |= icl->query_bus_param(icl) & SOCAM_DATAWIDTH_MASK;
        else
-               width_flag = SOCAM_DATAWIDTH_10;
+               flags |= SOCAM_DATAWIDTH_10;
 
-       return SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING |
-               SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW |
-               SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW |
-               SOCAM_DATA_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_SLAVE |
-               width_flag;
+       return soc_camera_apply_sensor_flags(icl, flags);
 }
 
 static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)