camera: update ov3640 driver.
authorroot <root@zyc-desktop.(none)>
Sat, 29 Sep 2012 03:51:50 +0000 (11:51 +0800)
committerroot <root@zyc-desktop.(none)>
Sat, 29 Sep 2012 03:51:50 +0000 (11:51 +0800)
drivers/media/video/ov3640.c
drivers/media/video/ov3640.h

index cdccaa9955de35420e08a000cba72bf812a869fc..4e8ef0861e8b3e0d41e6e0b66373187cf2419a7e 100644 (file)
@@ -185,7 +185,6 @@ static struct  flash_timer flash_off_timer;
 /* init VGA 640*480 */
 static struct reginfo sensor_init_data[] =
 {
-#if 1
        {0x3078, 0x02},
        {0x304d, 0x45},
        {0x30a7, 0x5e},
@@ -345,57 +344,42 @@ static struct reginfo sensor_init_data[] =
 #else
 
        //{0x307c, 0x13}, // flip && mirror
-       {0x307c, 0x11}, // flip && mirror ,by FAE.
-       {0x3090, 0xc8},
+       {0x307c, 0x10}, // flip && mirror ,by FAE.
+       {0x3090, 0xc0},
 #endif 
 
-#else
-//640 480 ;XGA-&gt;XGA;;
-     {0x3012, 0x10},
-     {0x3023, 0x06},
-     {0x3026, 0x03},
-     {0x3027, 0x04},
-     {0x302a, 0x03},
-     {0x302b, 0x10},
-     {0x3075, 0x24},
-     {0x300d, 0x01},
-     {0x30d7, 0x90},
-     {0x3069, 0x04},
-     {0x303e, 0x00},
-     {0x303f, 0xc0},
-     {0x3302, 0xef},
-     {0x335f, 0x34},
-     {0x3360, 0x0c},
-     {0x3361, 0x04},
-     {0x3362, 0x34},
-     {0x3363, 0x08},
-     {0x3364, 0x04},
-     {0x3403, 0x42},
-     {0x3088, 0x04},
-     {0x3089, 0x00},
-     {0x308a, 0x03},
-     {0x308b, 0x00},
-     {0x300e, 0x32},
-     {0x300f, 0x21},
-     {0x3010, 0x20},
-     {0x3011, 0x01},
-     {0x304c, 0x82},
-
-//;XGA-&gt;VGA
-     {0x3302, 0xef},
-     {0x335f, 0x34},
-     {0x3360, 0x0c},
-     {0x3361, 0x04},
-     {0x3362, 0x12},
-     {0x3363, 0x88},
-     {0x3364, 0xe4},
-     {0x3403, 0x42},
-     {0x3088, 0x12},
-     {0x3089, 0x80},
-     {0x308a, 0x01},
-     {0x308b, 0xe0},
-     {0x304c, 0x85},
-#endif
+       {0x3012, 0x10},
+       {0x3366, 0x15},
+       {0x3023, 0x06},
+       {0x3026, 0x03},
+       {0x3027, 0x04},
+       {0x302a, 0x03},
+       {0x302b, 0x39},
+       {0x3075, 0x24},
+       {0x300d, 0x01},
+       {0x30d7, 0x90},
+       {0x3069, 0x04},
+       {0x303e, 0x00},
+       {0x303f, 0xc0},
+       {0x300e, 0x32},
+       {0x300f, 0x21},
+       {0x3010, 0x20},
+       {0x3011, 0x01},
+       // XGA-VGA
+       {0x3302, 0xef},
+       {0x335f, 0x34},
+       {0x3360, 0x0c},
+       {0x3361, 0x04},
+       {0x3362, 0x12},
+       {0x3363, 0x88},
+       {0x3364, 0xe4},
+       {0x3403, 0x42},
+       {0x3088, 0x02},
+       {0x3089, 0x88},// 0x80, by FAE.
+       {0x308a, 0x01},
+       {0x308b, 0xe4},// 0xe0, by FAE.
+       {0x304c, 0x84}, //0x83, by FAE.
+
        {0x0000 ,0x00},
 };
 
@@ -1956,8 +1940,8 @@ static const struct sensor_datafmt *sensor_find_datafmt(
 }
 
 static const struct sensor_datafmt sensor_colour_fmts[] = {
-    {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG},
-    {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG}    
+    {V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG}    ,
+       {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG}
 };
 enum sensor_wq_cmd
 {
index 3435c12c466b7618c805900fed486adc5994211a..213c5dc2ea88a2a60a8525b10fe9f3474687f097 100755 (executable)
@@ -21,6 +21,6 @@ struct reginfo
 \r
 #define SEQUENCE_PROPERTY    0xFFFD\r
 #define SEQUENCE_WAIT_MS     0xFFFE\r
-#define SEQUENCE_END        0xFFFF\r
+#define SEQUENCE_END        0x0000\r
 #endif\r
 \r