aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/tw9910.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index 2256ba6e6147..8ec1031dacc3 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -117,7 +117,7 @@
117#define LCTL24 0x68 117#define LCTL24 0x68
118#define LCTL25 0x69 118#define LCTL25 0x69
119#define LCTL26 0x6A 119#define LCTL26 0x6A
120#define HSGEGIN 0x6B 120#define HSBEGIN 0x6B
121#define HSEND 0x6C 121#define HSEND 0x6C
122#define OVSDLY 0x6D 122#define OVSDLY 0x6D
123#define OVSEND 0x6E 123#define OVSEND 0x6E
@@ -443,10 +443,11 @@ static int tw9910_set_cropping(struct i2c_client *client,
443static int tw9910_set_hsync(struct i2c_client *client, 443static int tw9910_set_hsync(struct i2c_client *client,
444 const struct tw9910_hsync_ctrl *hsync) 444 const struct tw9910_hsync_ctrl *hsync)
445{ 445{
446 struct tw9910_priv *priv = to_tw9910(client);
446 int ret; 447 int ret;
447 448
448 /* bit 10 - 3 */ 449 /* bit 10 - 3 */
449 ret = i2c_smbus_write_byte_data(client, HSGEGIN, 450 ret = i2c_smbus_write_byte_data(client, HSBEGIN,
450 (hsync->start & 0x07F8) >> 3); 451 (hsync->start & 0x07F8) >> 3);
451 if (ret < 0) 452 if (ret < 0)
452 return ret; 453 return ret;
@@ -457,10 +458,12 @@ static int tw9910_set_hsync(struct i2c_client *client,
457 if (ret < 0) 458 if (ret < 0)
458 return ret; 459 return ret;
459 460
461 /* So far only revisions 0 and 1 have been seen */
460 /* bit 2 - 0 */ 462 /* bit 2 - 0 */
461 ret = tw9910_mask_set(client, HSLOWCTL, 0x77, 463 if (1 == priv->revision)
462 (hsync->start & 0x0007) << 4 | 464 ret = tw9910_mask_set(client, HSLOWCTL, 0x77,
463 (hsync->end & 0x0007)); 465 (hsync->start & 0x0007) << 4 |
466 (hsync->end & 0x0007));
464 467
465 return ret; 468 return ret;
466} 469}