summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-12-11 15:53:55 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-16 12:27:40 +0100
commit70da92e5740a6ab8bfe0db826c345c85e795f109 (patch)
tree45d812f362334569df09f37c5885850457b04232 /drivers/media
parentV4L/DVB (13668): tw9910: remove cropping (diff)
downloadlinux-70da92e5740a6ab8bfe0db826c345c85e795f109.tar.xz
linux-70da92e5740a6ab8bfe0db826c345c85e795f109.zip
V4L/DVB (13669): tw9910: Add sync polarity support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tw9910.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index e70905ceef48..5b801a6e1eea 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -512,12 +512,21 @@ static int tw9910_set_bus_param(struct soc_camera_device *icd,
{
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct i2c_client *client = sd->priv;
+ u8 val = VSSL_VVALID | HSSL_DVALID;
/*
* set OUTCTR1
+ *
+ * We use VVALID and DVALID signals to control VSYNC and HSYNC
+ * outputs, in this mode their polarity is inverted.
*/
- return i2c_smbus_write_byte_data(client, OUTCTR1,
- VSSL_VVALID | HSSL_DVALID);
+ if (flags & SOCAM_HSYNC_ACTIVE_LOW)
+ val |= HSP_HI;
+
+ if (flags & SOCAM_VSYNC_ACTIVE_LOW)
+ val |= VSP_HI;
+
+ return i2c_smbus_write_byte_data(client, OUTCTR1, val);
}
static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd)
@@ -527,6 +536,7 @@ static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd)
struct soc_camera_link *icl = to_soc_camera_link(icd);
unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH |
+ SOCAM_VSYNC_ACTIVE_LOW | SOCAM_HSYNC_ACTIVE_LOW |
SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth;
return soc_camera_apply_sensor_flags(icl, flags);