From 84927da3a42f2b2955686815b9939aebae04415d Mon Sep 17 00:00:00 2001 From: root Date: Sat, 29 Sep 2012 11:51:50 +0800 Subject: [PATCH] camera: update ov3640 driver. --- drivers/media/video/ov3640.c | 88 +++++++++++++++--------------------- drivers/media/video/ov3640.h | 2 +- 2 files changed, 37 insertions(+), 53 deletions(-) diff --git a/drivers/media/video/ov3640.c b/drivers/media/video/ov3640.c index cdccaa9955de..4e8ef0861e8b 100644 --- a/drivers/media/video/ov3640.c +++ b/drivers/media/video/ov3640.c @@ -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->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->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 { diff --git a/drivers/media/video/ov3640.h b/drivers/media/video/ov3640.h index 3435c12c466b..213c5dc2ea88 100755 --- a/drivers/media/video/ov3640.h +++ b/drivers/media/video/ov3640.h @@ -21,6 +21,6 @@ struct reginfo #define SEQUENCE_PROPERTY 0xFFFD #define SEQUENCE_WAIT_MS 0xFFFE -#define SEQUENCE_END 0xFFFF +#define SEQUENCE_END 0x0000 #endif -- 2.34.1