diff options
Diffstat (limited to 'drivers/media/video/tw9910.c')
-rw-r--r-- | drivers/media/video/tw9910.c | 14 |
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, | |||
512 | { | 512 | { |
513 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 513 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
514 | struct i2c_client *client = sd->priv; | 514 | struct i2c_client *client = sd->priv; |
515 | u8 val = VSSL_VVALID | HSSL_DVALID; | ||
515 | 516 | ||
516 | /* | 517 | /* |
517 | * set OUTCTR1 | 518 | * set OUTCTR1 |
519 | * | ||
520 | * We use VVALID and DVALID signals to control VSYNC and HSYNC | ||
521 | * outputs, in this mode their polarity is inverted. | ||
518 | */ | 522 | */ |
519 | return i2c_smbus_write_byte_data(client, OUTCTR1, | 523 | if (flags & SOCAM_HSYNC_ACTIVE_LOW) |
520 | VSSL_VVALID | HSSL_DVALID); | 524 | val |= HSP_HI; |
525 | |||
526 | if (flags & SOCAM_VSYNC_ACTIVE_LOW) | ||
527 | val |= VSP_HI; | ||
528 | |||
529 | return i2c_smbus_write_byte_data(client, OUTCTR1, val); | ||
521 | } | 530 | } |
522 | 531 | ||
523 | static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd) | 532 | 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) | |||
527 | struct soc_camera_link *icl = to_soc_camera_link(icd); | 536 | struct soc_camera_link *icl = to_soc_camera_link(icd); |
528 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | | 537 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | |
529 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | | 538 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | |
539 | SOCAM_VSYNC_ACTIVE_LOW | SOCAM_HSYNC_ACTIVE_LOW | | ||
530 | SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth; | 540 | SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth; |
531 | 541 | ||
532 | return soc_camera_apply_sensor_flags(icl, flags); | 542 | return soc_camera_apply_sensor_flags(icl, flags); |