camera:add ov5640 driver, this driver is not support auto focus temporarily

This commit is contained in:
ddl
2011-01-29 06:42:47 +08:00
parent 3ccd2e4cd8
commit fa383e14bb
8 changed files with 3595 additions and 12 deletions

View File

@@ -36,6 +36,7 @@
#define RK29_CAM_SENSOR_NAME_OV2655 "ov2655"
#define RK29_CAM_SENSOR_NAME_OV2659 "ov2659"
#define RK29_CAM_SENSOR_NAME_OV3640 "ov3640"
#define RK29_CAM_SENSOR_NAME_OV5640 "ov5640"
#define RK29_CAM_SENSOR_NAME_OV5642 "ov5642"
#define RK29_CAM_SENSOR_NAME_S5K6AA "s5k6aa"

View File

@@ -895,12 +895,6 @@ config SOC_CAMERA_OV5642
depends on SOC_CAMERA && I2C
help
This is a ov5642 camera driver
config SOC_CAMERA_S5K6AA
tristate "Samsung S5K6AA MIPI CSI-2 (importek mu736asa)"
depends on SOC_CAMERA && I2C
help
This is a samsung S5K6AA mobile camera driver
choice
prompt "OV5642 Module Focus select"
depends on SOC_CAMERA_OV5642
@@ -914,6 +908,30 @@ config OV5642_FIXEDFOCUS
bool "OV5642 fixed focus"
endchoice
config SOC_CAMERA_OV5640
tristate "ov5640 camera support"
depends on SOC_CAMERA && I2C
help
This is a ov5640 camera driver
choice
prompt "OV5640 Module Focus select"
depends on SOC_CAMERA_OV5640
default OV5640_AUTOFOCUS
---help---
config OV5640_AUTOFOCUS
bool "OV5640 auto focus"
config OV5640_FIXEDFOCUS
bool "OV5640 fixed focus"
endchoice
config SOC_CAMERA_S5K6AA
tristate "Samsung S5K6AA MIPI CSI-2 (importek mu736asa)"
depends on SOC_CAMERA && I2C
help
This is a samsung S5K6AA mobile camera driver
config MX1_VIDEO
bool

View File

@@ -83,6 +83,7 @@ obj-$(CONFIG_SOC_CAMERA_OV2655) += ov2655.o
obj-$(CONFIG_SOC_CAMERA_OV2659) += ov2659.o
obj-$(CONFIG_SOC_CAMERA_OV9650) += ov9650.o
obj-$(CONFIG_SOC_CAMERA_OV3640) += ov3640.o
obj-$(CONFIG_SOC_CAMERA_OV5640) += ov5640.o
obj-$(CONFIG_SOC_CAMERA_OV5642) += ov5642.o
obj-$(CONFIG_SOC_CAMERA_S5K6AA) += s5k6aa.o

3532
drivers/media/video/ov5640.c Executable file

File diff suppressed because it is too large Load Diff

15
drivers/media/video/ov5640.h Executable file
View File

@@ -0,0 +1,15 @@
#ifndef __OV5640_H__
#define __OV5640_H__
struct reginfo
{
u16 reg;
u8 val;
};
#define SEQUENCE_INIT 0x00
#define SEQUENCE_NORMAL 0x01
#define SEQUENCE_PROPERTY 0xFFFD
#define SEQUENCE_WAIT_MS 0xFFFE
#define SEQUENCE_END 0xFFFF
#endif

View File

@@ -0,0 +1,15 @@
/*
* Driver for OV5642 CMOS Image Sensor from OmniVision
*
* Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "ov5640.h"
struct reginfo sensor_af_firmware[] =
{
SEQUENCE_END,SEQUENCE_END
};

View File

@@ -708,8 +708,8 @@ static int rk29_camera_add_device(struct soc_camera_device *icd)
goto ebusy;
}
dev_info(&icd->dev, "RK29 Camera driver attached to camera %d\n",
icd->devnum);
dev_info(&icd->dev, "RK29 Camera driver attached to camera%d(%s)\n",
icd->devnum,dev_name(icd->pdev));
pcdev->frame_inval = RK29_CAM_FRAME_INVAL_INIT;
pcdev->active = NULL;
@@ -748,8 +748,8 @@ static void rk29_camera_remove_device(struct soc_camera_device *icd)
BUG_ON(icd != pcdev->icd);
dev_info(&icd->dev, "RK29 Camera driver detached from camera %d\n",
icd->devnum);
dev_info(&icd->dev, "RK29 Camera driver detached from camera%d(%s)\n",
icd->devnum,dev_name(icd->pdev));
v4l2_subdev_call(sd, core, ioctl, RK29_CAM_SUBDEV_DEACTIVATE,NULL);
rk29_camera_deactivate(pcdev);

View File

@@ -67,8 +67,9 @@ enum {
V4L2_IDENT_OV2655 = 257, /* ddl@rock-chips.com : ov2655 support */
V4L2_IDENT_OV2659 = 258,
V4L2_IDENT_OV3640 = 259,
V4L2_IDENT_OV5642 = 260,
V4L2_IDENT_OV7675 = 261,
V4L2_IDENT_OV5640 = 260,
V4L2_IDENT_OV5642 = 261,
V4L2_IDENT_OV7675 = 262,
/* module saa7146: reserved range 300-309 */
V4L2_IDENT_SAA7146 = 300,