diff options
author | Brian Johnson <brijohn@gmail.com> | 2010-05-05 12:22:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:59:01 -0400 |
commit | 6ea23bd0bbeeaf67bd57f2195d8d97af96072ea3 (patch) | |
tree | 247f0a0f440ad4c6bf31d99c6931a01d9e412755 /drivers/media/video | |
parent | 33ddc16f1003fc13d57ebe5061b29e16e6f84848 (diff) |
V4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/sn9c20x.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index dad5ddeb7ff3..644a7fd4701a 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -996,29 +996,12 @@ static struct i2c_reg_u16 mt9v112_init[] = { | |||
996 | 996 | ||
997 | static struct i2c_reg_u16 mt9v111_init[] = { | 997 | static struct i2c_reg_u16 mt9v111_init[] = { |
998 | {0x01, 0x0004}, {0x0d, 0x0001}, {0x0d, 0x0000}, | 998 | {0x01, 0x0004}, {0x0d, 0x0001}, {0x0d, 0x0000}, |
999 | {0x01, 0x0001}, {0x02, 0x0016}, {0x03, 0x01e1}, | 999 | {0x01, 0x0001}, {0x05, 0x0004}, {0x2d, 0xe0a0}, |
1000 | {0x04, 0x0281}, {0x05, 0x0004}, {0x07, 0x3002}, | 1000 | {0x2e, 0x0c64}, {0x2f, 0x0064}, {0x06, 0x600e}, |
1001 | {0x21, 0x0000}, {0x25, 0x4024}, {0x26, 0xff03}, | 1001 | {0x08, 0x0480}, {0x01, 0x0004}, {0x02, 0x0016}, |
1002 | {0x27, 0xff10}, {0x2b, 0x7828}, {0x2c, 0xb43c}, | 1002 | {0x03, 0x01e7}, {0x04, 0x0287}, {0x05, 0x0004}, |
1003 | {0x2d, 0xf0a0}, {0x2e, 0x0c64}, {0x2f, 0x0064}, | 1003 | {0x06, 0x002d}, {0x07, 0x3002}, {0x08, 0x0008}, |
1004 | {0x67, 0x4010}, {0x06, 0x301e}, {0x08, 0x0480}, | 1004 | {0x0e, 0x0008}, {0x20, 0x0000} |
1005 | {0x01, 0x0004}, {0x02, 0x0016}, {0x03, 0x01e6}, | ||
1006 | {0x04, 0x0286}, {0x05, 0x0004}, {0x06, 0x0000}, | ||
1007 | {0x07, 0x3002}, {0x08, 0x0008}, {0x0c, 0x0000}, | ||
1008 | {0x0d, 0x0000}, {0x0e, 0x0000}, {0x0f, 0x0000}, | ||
1009 | {0x10, 0x0000}, {0x11, 0x0000}, {0x12, 0x00b0}, | ||
1010 | {0x13, 0x007c}, {0x14, 0x0000}, {0x15, 0x0000}, | ||
1011 | {0x16, 0x0000}, {0x17, 0x0000}, {0x18, 0x0000}, | ||
1012 | {0x19, 0x0000}, {0x1a, 0x0000}, {0x1b, 0x0000}, | ||
1013 | {0x1c, 0x0000}, {0x1d, 0x0000}, {0x30, 0x0000}, | ||
1014 | {0x30, 0x0005}, {0x31, 0x0000}, {0x02, 0x0016}, | ||
1015 | {0x03, 0x01e1}, {0x04, 0x0281}, {0x05, 0x0004}, | ||
1016 | {0x06, 0x0000}, {0x07, 0x3002}, {0x06, 0x002d}, | ||
1017 | {0x05, 0x0004}, {0x09, 0x0064}, {0x2b, 0x00a0}, | ||
1018 | {0x2c, 0x00a0}, {0x2d, 0x00a0}, {0x2e, 0x00a0}, | ||
1019 | {0x02, 0x0016}, {0x03, 0x01e1}, {0x04, 0x0281}, | ||
1020 | {0x05, 0x0004}, {0x06, 0x002d}, {0x07, 0x3002}, | ||
1021 | {0x0e, 0x0008}, {0x06, 0x002d}, {0x05, 0x0004}, | ||
1022 | }; | 1005 | }; |
1023 | 1006 | ||
1024 | static struct i2c_reg_u16 mt9v011_init[] = { | 1007 | static struct i2c_reg_u16 mt9v011_init[] = { |
@@ -1369,6 +1352,7 @@ static int mt9v_init_sensor(struct gspca_dev *gspca_dev) | |||
1369 | return -ENODEV; | 1352 | return -ENODEV; |
1370 | } | 1353 | } |
1371 | } | 1354 | } |
1355 | gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX); | ||
1372 | sd->hstart = 2; | 1356 | sd->hstart = 2; |
1373 | sd->vstart = 2; | 1357 | sd->vstart = 2; |
1374 | sd->sensor = SENSOR_MT9V111; | 1358 | sd->sensor = SENSOR_MT9V111; |
@@ -1623,7 +1607,6 @@ static int set_exposure(struct gspca_dev *gspca_dev) | |||
1623 | break; | 1607 | break; |
1624 | case SENSOR_MT9M001: | 1608 | case SENSOR_MT9M001: |
1625 | case SENSOR_MT9V112: | 1609 | case SENSOR_MT9V112: |
1626 | case SENSOR_MT9V111: | ||
1627 | case SENSOR_MT9V011: | 1610 | case SENSOR_MT9V011: |
1628 | exp[0] |= (3 << 4); | 1611 | exp[0] |= (3 << 4); |
1629 | exp[2] = 0x09; | 1612 | exp[2] = 0x09; |
@@ -1658,7 +1641,6 @@ static int set_gain(struct gspca_dev *gspca_dev) | |||
1658 | gain[3] = ov_gain[sd->gain]; | 1641 | gain[3] = ov_gain[sd->gain]; |
1659 | break; | 1642 | break; |
1660 | case SENSOR_MT9V011: | 1643 | case SENSOR_MT9V011: |
1661 | case SENSOR_MT9V111: | ||
1662 | gain[0] |= (3 << 4); | 1644 | gain[0] |= (3 << 4); |
1663 | gain[2] = 0x35; | 1645 | gain[2] = 0x35; |
1664 | gain[3] = micron1_gain[sd->gain] >> 8; | 1646 | gain[3] = micron1_gain[sd->gain] >> 8; |