Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176861
b: refs/heads/master
c: 70da92e
h: refs/heads/master
i:
  176859: 9cecb5f
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mauro Carvalho Chehab committed Dec 16, 2009
1 parent 3af86cb commit 937f576
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1d7b06cc37af3a958f7573af69ce2d0920ca79d
refs/heads/master: 70da92e5740a6ab8bfe0db826c345c85e795f109
14 changes: 12 additions & 2 deletions trunk/drivers/media/video/tw9910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 937f576

Please sign in to comment.