aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sonixj.c')
-rw-r--r--drivers/media/video/gspca/sonixj.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index d75b1d20b318..572b0f363b64 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -707,6 +707,7 @@ static void i2c_w8(struct gspca_dev *gspca_dev,
707 0x08, 0, /* value, index */ 707 0x08, 0, /* value, index */
708 gspca_dev->usb_buf, 8, 708 gspca_dev->usb_buf, 8,
709 500); 709 500);
710 msleep(2);
710} 711}
711 712
712/* read 5 bytes in gspca_dev->usb_buf */ 713/* read 5 bytes in gspca_dev->usb_buf */
@@ -976,13 +977,13 @@ static int sd_init(struct gspca_dev *gspca_dev)
976 case BRIDGE_SN9C105: 977 case BRIDGE_SN9C105:
977 if (regF1 != 0x11) 978 if (regF1 != 0x11)
978 return -ENODEV; 979 return -ENODEV;
979 reg_w(gspca_dev, 0x02, regGpio, 2); 980 reg_w(gspca_dev, 0x01, regGpio, 2);
980 break; 981 break;
981 case BRIDGE_SN9C120: 982 case BRIDGE_SN9C120:
982 if (regF1 != 0x12) 983 if (regF1 != 0x12)
983 return -ENODEV; 984 return -ENODEV;
984 regGpio[1] = 0x70; 985 regGpio[1] = 0x70;
985 reg_w(gspca_dev, 0x02, regGpio, 2); 986 reg_w(gspca_dev, 0x01, regGpio, 2);
986 break; 987 break;
987 default: 988 default:
988/* case BRIDGE_SN9C110: */ 989/* case BRIDGE_SN9C110: */
@@ -1183,7 +1184,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
1183 static const __u8 CA[] = { 0x28, 0xd8, 0x14, 0xec }; 1184 static const __u8 CA[] = { 0x28, 0xd8, 0x14, 0xec };
1184 static const __u8 CE[] = { 0x32, 0xdd, 0x2d, 0xdd }; /* MI0360 */ 1185 static const __u8 CE[] = { 0x32, 0xdd, 0x2d, 0xdd }; /* MI0360 */
1185 static const __u8 CE_ov76xx[] = 1186 static const __u8 CE_ov76xx[] =
1186 { 0x32, 0xdd, 0x32, 0xdd }; /* OV7630/48 */ 1187 { 0x32, 0xdd, 0x32, 0xdd };
1187 1188
1188 sn9c1xx = sn_tb[(int) sd->sensor]; 1189 sn9c1xx = sn_tb[(int) sd->sensor];
1189 configure_gpio(gspca_dev, sn9c1xx); 1190 configure_gpio(gspca_dev, sn9c1xx);
@@ -1223,8 +1224,15 @@ static void sd_start(struct gspca_dev *gspca_dev)
1223 reg_w(gspca_dev, 0x20, gamma_def, sizeof gamma_def); 1224 reg_w(gspca_dev, 0x20, gamma_def, sizeof gamma_def);
1224 for (i = 0; i < 8; i++) 1225 for (i = 0; i < 8; i++)
1225 reg_w(gspca_dev, 0x84, reg84, sizeof reg84); 1226 reg_w(gspca_dev, 0x84, reg84, sizeof reg84);
1227 switch (sd->sensor) {
1228 case SENSOR_OV7660:
1229 reg_w1(gspca_dev, 0x9a, 0x05);
1230 break;
1231 default:
1226 reg_w1(gspca_dev, 0x9a, 0x08); 1232 reg_w1(gspca_dev, 0x9a, 0x08);
1227 reg_w1(gspca_dev, 0x99, 0x59); 1233 reg_w1(gspca_dev, 0x99, 0x59);
1234 break;
1235 }
1228 1236
1229 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 1237 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
1230 if (mode) 1238 if (mode)
@@ -1275,8 +1283,8 @@ static void sd_start(struct gspca_dev *gspca_dev)
1275/* reg1 = 0x44; */ 1283/* reg1 = 0x44; */
1276/* reg1 = 0x46; (done) */ 1284/* reg1 = 0x46; (done) */
1277 } else { 1285 } else {
1278 reg17 = 0x22; /* 640 MCKSIZE */ 1286 reg17 = 0xa2; /* 640 */
1279 reg1 = 0x06; 1287 reg1 = 0x44;
1280 } 1288 }
1281 break; 1289 break;
1282 } 1290 }
@@ -1285,6 +1293,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
1285 switch (sd->sensor) { 1293 switch (sd->sensor) {
1286 case SENSOR_OV7630: 1294 case SENSOR_OV7630:
1287 case SENSOR_OV7648: 1295 case SENSOR_OV7648:
1296 case SENSOR_OV7660:
1288 reg_w(gspca_dev, 0xce, CE_ov76xx, 4); 1297 reg_w(gspca_dev, 0xce, CE_ov76xx, 4);
1289 break; 1298 break;
1290 default: 1299 default: