aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2009-06-21 13:58:55 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:17:40 -0400
commitbf40b382f6ce53cdee48917d14b13ae004c3deab (patch)
tree4440afd19eb490c47688405af2502333f98f8c98
parent7c7ddf1638a45923ab053d1f7818c6d123148b4b (diff)
V4L/DVB (12984): gspca - m5602-ov7660: Use a new raw init
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov7660.c12
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov7660.h248
2 files changed, 254 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c
index 80c64caac353..f7c050f2552a 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov7660.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c
@@ -211,17 +211,17 @@ int ov7660_init(struct sd *sd)
211 s32 *sensor_settings = sd->sensor_priv; 211 s32 *sensor_settings = sd->sensor_priv;
212 212
213 /* Init the sensor */ 213 /* Init the sensor */
214 for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) { 214 for (i = 0; i < ARRAY_SIZE(init2_ov7660); i++) {
215 u8 data[2]; 215 u8 data[2];
216 216
217 if (init_ov7660[i][0] == BRIDGE) { 217 if (init2_ov7660[i][0] == BRIDGE) {
218 err = m5602_write_bridge(sd, 218 err = m5602_write_bridge(sd,
219 init_ov7660[i][1], 219 init2_ov7660[i][1],
220 init_ov7660[i][2]); 220 init2_ov7660[i][2]);
221 } else { 221 } else {
222 data[0] = init_ov7660[i][2]; 222 data[0] = init2_ov7660[i][2];
223 err = m5602_write_sensor(sd, 223 err = m5602_write_sensor(sd,
224 init_ov7660[i][1], data, 1); 224 init2_ov7660[i][1], data, 1);
225 } 225 }
226 } 226 }
227 227
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/video/gspca/m5602/m5602_ov7660.h
index 8027b64b7d5b..eb0b50ed00e8 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov7660.h
+++ b/drivers/media/video/gspca/m5602/m5602_ov7660.h
@@ -270,4 +270,252 @@ static const unsigned char init_ov7660[][4] =
270 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0} 270 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}
271}; 271};
272 272
273static const unsigned char init2_ov7660[][4] = {
274 {BRIDGE, 0x13, 0x02},
275 {BRIDGE, 0x12, 0xb0},
276 {BRIDGE, 0x15, 0x00},
277 {BRIDGE, 0x14, 0xb0},
278 {BRIDGE, 0x60, 0xc0},
279 {BRIDGE, 0x00, 0x0d},
280 {BRIDGE, 0x01, 0x00},
281 {BRIDGE, 0x77, 0x01},
282 {BRIDGE, 0x77, 0x01},
283 {BRIDGE, 0x15, 0x00},
284 {BRIDGE, 0x14, 0xb0},
285 {BRIDGE, 0x60, 0xc0},
286 {BRIDGE, 0x00, 0x0c},
287 {BRIDGE, 0x77, 0x05},
288 {BRIDGE, 0x76, 0x00},
289 {BRIDGE, 0x74, 0x06},
290 {BRIDGE, 0x75, 0x00},
291 {SENSOR, 0x12, 0x80},
292 {SENSOR, 0x11, 0x80},
293 {SENSOR, 0x01, 0x80},
294 {SENSOR, 0x02, 0x80},
295 {SENSOR, 0x14, 0x4c},
296 {SENSOR, 0x39, 0x43},
297 {SENSOR, 0x3c, 0x28},
298 {SENSOR, 0x13, 0x00},
299 {SENSOR, 0x15, 0x40},
300 {SENSOR, 0x17, 0x0c},
301 {SENSOR, 0x18, 0x61},
302 {SENSOR, 0x32, 0xa4},
303 {SENSOR, 0x1b, 0x0b},
304 {SENSOR, 0x19, 0x01},
305 {SENSOR, 0x1a, 0x7a},
306 {SENSOR, 0x03, 0x00},
307 {SENSOR, 0x12, 0x05},
308 {SENSOR, 0x0f, 0x42},
309 {SENSOR, 0x27, 0x94},
310 {SENSOR, 0x28, 0x94},
311 {SENSOR, 0x29, 0x94},
312 {SENSOR, 0x2c, 0x94},
313 {SENSOR, 0x04, 0x00},
314 {SENSOR, 0x10, 0x00},
315 {SENSOR, 0x07, 0x00},
316 {SENSOR, 0x37, 0x05},
317 {SENSOR, 0x3d, 0x00},
318 {SENSOR, 0xa1, 0x23},
319 {SENSOR, 0x3a, 0x0d},
320 {SENSOR, 0x69, 0x80},
321 {SENSOR, 0x62, 0x00},
322 {SENSOR, 0x63, 0x00},
323 {SENSOR, 0x64, 0x10},
324 {SENSOR, 0x65, 0x40},
325 {SENSOR, 0x66, 0x01},
326 {BRIDGE, 0x15, 0x06},
327 {BRIDGE, 0x14, 0xb0},
328 {BRIDGE, 0x60, 0xc0},
329 {BRIDGE, 0x00, 0x0c},
330 {BRIDGE, 0x02, 0x81},
331 {BRIDGE, 0x04, 0x82},
332 {BRIDGE, 0x0a, 0x01},
333 {BRIDGE, 0x06, 0x00},
334 {BRIDGE, 0x06, 0x08},
335 {BRIDGE, 0x06, 0x00},
336 {BRIDGE, 0x06, 0x00},
337 {BRIDGE, 0x06, 0x01},
338 {BRIDGE, 0x06, 0xec},
339 {BRIDGE, 0x06, 0x00},
340 {BRIDGE, 0x06, 0x00},
341 {BRIDGE, 0x0a, 0x00},
342 {BRIDGE, 0x0a, 0x02},
343 {BRIDGE, 0x07, 0x00},
344 {BRIDGE, 0x07, 0x27},
345 {BRIDGE, 0x07, 0x02},
346 {BRIDGE, 0x07, 0xae},
347 {BRIDGE, 0x0a, 0x00},
348 {SENSOR, 0x01, 0x80},
349 {SENSOR, 0x02, 0x80},
350 {BRIDGE, 0x15, 0x02},
351 {BRIDGE, 0x14, 0xb0},
352 {SENSOR, 0x10, 0x20},
353 {SENSOR, 0x04, 0x00},
354 {SENSOR, 0x00, 0x07},
355 {SENSOR, 0x39, 0x0c},
356 {SENSOR, 0x09, 0x11},
357 {SENSOR, 0x12, 0x05},
358 {BRIDGE, 0x77, 0x01},
359 {BRIDGE, 0x76, 0x04},
360 {BRIDGE, 0x74, 0x06},
361 {BRIDGE, 0x72, 0x06},
362 {BRIDGE, 0x70, 0x00},
363 {BRIDGE, 0x15, 0x08},
364 {BRIDGE, 0x14, 0xb0},
365 {BRIDGE, 0x15, 0x00},
366 {BRIDGE, 0x14, 0xb0},
367 {BRIDGE, 0x60, 0xc0},
368 {BRIDGE, 0x00, 0x0c},
369 {BRIDGE, 0x77, 0x05},
370 {BRIDGE, 0x76, 0x00},
371 {BRIDGE, 0x74, 0x06},
372 {BRIDGE, 0x75, 0x00},
373 {SENSOR, 0x12, 0x80},
374 {SENSOR, 0x11, 0x80},
375 {SENSOR, 0x01, 0x80},
376 {SENSOR, 0x02, 0x80},
377 {SENSOR, 0x14, 0x4c},
378 {SENSOR, 0x39, 0x43},
379 {SENSOR, 0x3c, 0x28},
380 {SENSOR, 0x13, 0x00},
381 {SENSOR, 0x15, 0x40},
382 {SENSOR, 0x17, 0x0c},
383 {SENSOR, 0x18, 0x61},
384 {SENSOR, 0x32, 0xa4},
385 {SENSOR, 0x1b, 0x0b},
386 {SENSOR, 0x19, 0x01},
387 {SENSOR, 0x1a, 0x7a},
388 {SENSOR, 0x03, 0x00},
389 {SENSOR, 0x12, 0x05},
390 {SENSOR, 0x0f, 0x42},
391 {SENSOR, 0x27, 0x94},
392 {SENSOR, 0x28, 0x94},
393 {SENSOR, 0x29, 0x94},
394 {SENSOR, 0x2c, 0x94},
395 {SENSOR, 0x04, 0x00},
396 {SENSOR, 0x10, 0x00},
397 {SENSOR, 0x07, 0x00},
398 {SENSOR, 0x37, 0x05},
399 {SENSOR, 0x3d, 0x00},
400 {SENSOR, 0xa1, 0x23},
401 {SENSOR, 0x3a, 0x0d},
402 {SENSOR, 0x69, 0x80},
403 {SENSOR, 0x62, 0x00},
404 {SENSOR, 0x63, 0x00},
405 {SENSOR, 0x64, 0x10},
406 {SENSOR, 0x65, 0x40},
407 {SENSOR, 0x66, 0x01},
408 {BRIDGE, 0x15, 0x06},
409 {BRIDGE, 0x14, 0xb0},
410 {BRIDGE, 0x60, 0xc0},
411 {BRIDGE, 0x00, 0x0c},
412 {BRIDGE, 0x02, 0x81},
413 {BRIDGE, 0x04, 0x82},
414 {BRIDGE, 0x0a, 0x01},
415 {BRIDGE, 0x06, 0x00},
416 {BRIDGE, 0x06, 0x08},
417 {BRIDGE, 0x06, 0x00},
418 {BRIDGE, 0x06, 0x00},
419 {BRIDGE, 0x06, 0x01},
420 {BRIDGE, 0x06, 0xec},
421 {BRIDGE, 0x06, 0x00},
422 {BRIDGE, 0x06, 0x00},
423 {BRIDGE, 0x0a, 0x00},
424 {BRIDGE, 0x0a, 0x02},
425 {BRIDGE, 0x07, 0x00},
426 {BRIDGE, 0x07, 0x27},
427 {BRIDGE, 0x07, 0x02},
428 {BRIDGE, 0x07, 0xae},
429 {BRIDGE, 0x0a, 0x00},
430 {SENSOR, 0x01, 0x80},
431 {SENSOR, 0x02, 0x80},
432 {BRIDGE, 0x15, 0x00},
433 {BRIDGE, 0x14, 0xb0},
434 {SENSOR, 0x10, 0x5f},
435 {SENSOR, 0x04, 0x03},
436 {SENSOR, 0x00, 0x02},
437 {SENSOR, 0x39, 0x0c},
438 {SENSOR, 0x09, 0x11},
439 {SENSOR, 0x12, 0x05},
440 {BRIDGE, 0x77, 0x01},
441 {BRIDGE, 0x76, 0x04},
442 {BRIDGE, 0x74, 0x06},
443 {BRIDGE, 0x72, 0x06},
444 {BRIDGE, 0x70, 0x00},
445 {BRIDGE, 0x15, 0x08},
446 {BRIDGE, 0x14, 0xb0},
447 {BRIDGE, 0x15, 0x00},
448 {BRIDGE, 0x14, 0xb0},
449 {BRIDGE, 0x60, 0xc0},
450 {BRIDGE, 0x00, 0x0c},
451 {BRIDGE, 0x77, 0x05},
452 {BRIDGE, 0x76, 0x00},
453 {BRIDGE, 0x74, 0x06},
454 {BRIDGE, 0x75, 0x00},
455 {SENSOR, 0x12, 0x80},
456 {SENSOR, 0x11, 0x80},
457 {SENSOR, 0x01, 0x80},
458 {SENSOR, 0x02, 0x80},
459 {SENSOR, 0x14, 0x4c},
460 {SENSOR, 0x39, 0x43},
461 {SENSOR, 0x3c, 0x28},
462 {SENSOR, 0x13, 0x00},
463 {SENSOR, 0x15, 0x40},
464 {SENSOR, 0x17, 0x0c},
465 {SENSOR, 0x18, 0x61},
466 {SENSOR, 0x32, 0xa4},
467 {SENSOR, 0x1b, 0x0b},
468 {SENSOR, 0x19, 0x01},
469 {SENSOR, 0x1a, 0x7a},
470 {SENSOR, 0x03, 0x00},
471 {SENSOR, 0x12, 0x05},
472 {SENSOR, 0x0f, 0x42},
473 {SENSOR, 0x27, 0x94},
474 {SENSOR, 0x28, 0x94},
475 {SENSOR, 0x29, 0x94},
476 {SENSOR, 0x2c, 0x94},
477 {SENSOR, 0x04, 0x00},
478 {SENSOR, 0x10, 0x00},
479 {SENSOR, 0x07, 0x00},
480 {SENSOR, 0x37, 0x05},
481 {SENSOR, 0x3d, 0x00},
482 {SENSOR, 0xa1, 0x23},
483 {SENSOR, 0x3a, 0x0d},
484 {SENSOR, 0x69, 0x80},
485 {SENSOR, 0x62, 0x00},
486 {SENSOR, 0x63, 0x00},
487 {SENSOR, 0x64, 0x10},
488 {SENSOR, 0x65, 0x40},
489 {SENSOR, 0x66, 0x01},
490 {BRIDGE, 0x15, 0x06},
491 {BRIDGE, 0x14, 0xb0},
492 {BRIDGE, 0x60, 0xc0},
493 {BRIDGE, 0x00, 0x0c},
494 {BRIDGE, 0x02, 0x81},
495 {BRIDGE, 0x04, 0x82},
496 {BRIDGE, 0x0a, 0x01},
497 {BRIDGE, 0x06, 0x00},
498 {BRIDGE, 0x06, 0x08},
499 {BRIDGE, 0x06, 0x00},
500 {BRIDGE, 0x06, 0x00},
501 {BRIDGE, 0x06, 0x01},
502 {BRIDGE, 0x06, 0xec},
503 {BRIDGE, 0x06, 0x00},
504 {BRIDGE, 0x06, 0x00},
505 {BRIDGE, 0x0a, 0x00},
506 {BRIDGE, 0x0a, 0x02},
507 {BRIDGE, 0x07, 0x00},
508 {BRIDGE, 0x07, 0x27},
509 {BRIDGE, 0x07, 0x02},
510 {BRIDGE, 0x07, 0xae},
511 {BRIDGE, 0x0a, 0x00},
512 {SENSOR, 0x01, 0x80},
513 {SENSOR, 0x02, 0x80},
514 {BRIDGE, 0x15, 0x00},
515 {BRIDGE, 0x14, 0xb0},
516 {SENSOR, 0x10, 0x5f},
517 {SENSOR, 0x04, 0x03},
518 {SENSOR, 0x00, 0x02}
519};
520
273#endif 521#endif