camera: all sensor driver(ov3640/ov9650 exception) can be compiled success in rk30 and rk29

This commit is contained in:
ddl
2012-04-12 11:23:26 +08:00
parent 6f4a088358
commit f4c030d764
22 changed files with 40 additions and 41 deletions

View File

@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);

View File

@@ -19,7 +19,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "mt9d112.h"
static int debug;
@@ -66,7 +66,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_Scene 1
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0
#define CONFIG_SENSOR_Focus 0

View File

@@ -20,7 +20,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "mt9d113.h"
static int debug;
@@ -69,7 +69,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_Scene 0
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0
#define CONFIG_SENSOR_Focus 0
@@ -2921,7 +2921,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct soc_camera_device *icd = client->dev.platform_data;
struct sensor *sensor = to_sensor(client);
int ret = 0;
int ret = 0,i;
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
switch (cmd)

View File

@@ -20,7 +20,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "mt9m112.h"
static int debug;

View File

@@ -22,7 +22,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "mt9p111.h"
static int debug;

View File

@@ -20,7 +20,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "mt9t111.h"
static int debug;

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);

View File

@@ -9,7 +9,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -55,7 +55,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0
@@ -2824,7 +2824,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct soc_camera_device *icd = client->dev.platform_data;
struct sensor *sensor = to_sensor(client);
int ret = 0;
int ret = 0,i;
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
switch (cmd)

View File

@@ -19,7 +19,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "ov5640.h"
static int debug;
@@ -63,7 +63,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_Scene 1
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0
#ifdef CONFIG_OV5640_AUTOFOCUS
@@ -3778,7 +3778,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct soc_camera_device *icd = client->dev.platform_data;
struct sensor *sensor = to_sensor(client);
int ret = 0;
int ret = 0,i;
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
switch (cmd)

View File

@@ -19,7 +19,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include "ov5640.h"
static int debug = 1;

View File

@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0

View File

@@ -19,7 +19,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
#include <linux/delay.h>
#include "s5k6aa.h"
static int debug;

View File

@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0
@@ -1800,7 +1800,6 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
#endif
#if CONFIG_SENSOR_Flash
sensor_set_flash();
qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH);
if (qctrl)
sensor->info_priv.flash = qctrl->default_value;
@@ -2049,7 +2048,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
if ((int)winseqe_set_addr != sensor->info_priv.winseqe_cur_addr) {
#if CONFIG_SENSOR_Flash
if (sensor_fmt_capturechk(sd,f) == true) { /* ddl@rock-chips.com : Capture */
if (sensor_fmt_capturechk(sd,mf) == true) { /* ddl@rock-chips.com : Capture */
if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) {
sensor_ioctrl(icd, Sensor_Flash, Flash_On);
SENSOR_DG("%s flash on in capture!\n", SENSOR_NAME_STRING());
@@ -2065,7 +2064,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
if (ret != 0) {
SENSOR_TR("%s set format capability failed\n", SENSOR_NAME_STRING());
#if CONFIG_SENSOR_Flash
if (sensor_fmt_capturechk(sd,f) == true) {
if (sensor_fmt_capturechk(sd,mf) == true) {
if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) {
sensor_ioctrl(icd, Sensor_Flash, Flash_Off);
SENSOR_TR("%s Capture format set fail, flash off !\n", SENSOR_NAME_STRING());

View File

@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
#include <mach/rk29_camera.h>
#include <plat/rk_camera.h>
static int debug;
module_param(debug, int, S_IRUGO|S_IWUSR);
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
#define CONFIG_SENSOR_DigitalZoom 0
#define CONFIG_SENSOR_Focus 0
#define CONFIG_SENSOR_Exposure 0
#define CONFIG_SENSOR_Flash 0
#define CONFIG_SENSOR_Flash 1
#define CONFIG_SENSOR_Mirror 0
#define CONFIG_SENSOR_Flip 0