From f4c030d7646445f6c9e72bf7526a9fab885212ed Mon Sep 17 00:00:00 2001 From: ddl Date: Thu, 12 Apr 2012 11:23:26 +0800 Subject: [PATCH] camera: all sensor driver(ov3640/ov9650 exception) can be compiled success in rk30 and rk29 --- drivers/media/video/gc0307.c | 4 ++-- drivers/media/video/gc0308.c | 4 ++-- drivers/media/video/gc0309.c | 4 ++-- drivers/media/video/gc0309_for_td8801.c | 2 +- drivers/media/video/gc2015.c | 4 ++-- drivers/media/video/gt2005.c | 4 ++-- drivers/media/video/hi253.c | 2 +- drivers/media/video/hi704.c | 2 +- drivers/media/video/mt9d112.c | 4 ++-- drivers/media/video/mt9d113.c | 6 +++--- drivers/media/video/mt9m112.c | 2 +- drivers/media/video/mt9p111.c | 2 +- drivers/media/video/mt9t111.c | 2 +- drivers/media/video/nt99250.c | 2 +- drivers/media/video/ov2640_rk.c | 6 +++--- drivers/media/video/ov5640.c | 6 +++--- drivers/media/video/ov5640_for_td8801.c | 2 +- drivers/media/video/ov7675.c | 4 ++-- drivers/media/video/ov7690.c | 4 ++-- drivers/media/video/s5k6aa.c | 2 +- drivers/media/video/sid130B.c | 9 ++++----- drivers/media/video/siv120b.c | 4 ++-- 22 files changed, 40 insertions(+), 41 deletions(-) diff --git a/drivers/media/video/gc0307.c b/drivers/media/video/gc0307.c index baff822d39d7..bacf9b53e697 100755 --- a/drivers/media/video/gc0307.c +++ b/drivers/media/video/gc0307.c @@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/gc0308.c b/drivers/media/video/gc0308.c index 033f533780dc..e4e5ed9d54ad 100755 --- a/drivers/media/video/gc0308.c +++ b/drivers/media/video/gc0308.c @@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/gc0309.c b/drivers/media/video/gc0309.c index 0ee641e8c7cf..36e31aeee78f 100755 --- a/drivers/media/video/gc0309.c +++ b/drivers/media/video/gc0309.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/gc0309_for_td8801.c b/drivers/media/video/gc0309_for_td8801.c index f23c4d81a15f..74ebdbfbc2c3 100644 --- a/drivers/media/video/gc0309_for_td8801.c +++ b/drivers/media/video/gc0309_for_td8801.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include static int debug; module_param(debug, int, S_IRUGO|S_IWUSR); diff --git a/drivers/media/video/gc2015.c b/drivers/media/video/gc2015.c index b31ed13207be..f98bf8e16c45 100755 --- a/drivers/media/video/gc2015.c +++ b/drivers/media/video/gc2015.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/gt2005.c b/drivers/media/video/gt2005.c index 6ecc115b6b1f..5eeb8d5a8ffd 100755 --- a/drivers/media/video/gt2005.c +++ b/drivers/media/video/gt2005.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/hi253.c b/drivers/media/video/hi253.c index 343a22c73c98..aef2d41b4d73 100755 --- a/drivers/media/video/hi253.c +++ b/drivers/media/video/hi253.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include static int debug; module_param(debug, int, S_IRUGO|S_IWUSR); diff --git a/drivers/media/video/hi704.c b/drivers/media/video/hi704.c index 6c2c2659cd36..b52826dc87fe 100755 --- a/drivers/media/video/hi704.c +++ b/drivers/media/video/hi704.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include static int debug; module_param(debug, int, S_IRUGO|S_IWUSR); diff --git a/drivers/media/video/mt9d112.c b/drivers/media/video/mt9d112.c index 997657e0d71e..847362310158 100755 --- a/drivers/media/video/mt9d112.c +++ b/drivers/media/video/mt9d112.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #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 diff --git a/drivers/media/video/mt9d113.c b/drivers/media/video/mt9d113.c index 191482da4d28..363aacd486e8 100755 --- a/drivers/media/video/mt9d113.c +++ b/drivers/media/video/mt9d113.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #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) diff --git a/drivers/media/video/mt9m112.c b/drivers/media/video/mt9m112.c index 348fe2ad7980..bfa12354e1bb 100755 --- a/drivers/media/video/mt9m112.c +++ b/drivers/media/video/mt9m112.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "mt9m112.h" static int debug; diff --git a/drivers/media/video/mt9p111.c b/drivers/media/video/mt9p111.c index b5bf570adf79..99bfc78e6b40 100644 --- a/drivers/media/video/mt9p111.c +++ b/drivers/media/video/mt9p111.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "mt9p111.h" static int debug; diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c index ce2575e0f327..bb59b180e6ea 100755 --- a/drivers/media/video/mt9t111.c +++ b/drivers/media/video/mt9t111.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "mt9t111.h" static int debug; diff --git a/drivers/media/video/nt99250.c b/drivers/media/video/nt99250.c index 4aaaecee8aff..56f80d267d70 100755 --- a/drivers/media/video/nt99250.c +++ b/drivers/media/video/nt99250.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include static int debug; module_param(debug, int, S_IRUGO|S_IWUSR); diff --git a/drivers/media/video/ov2640_rk.c b/drivers/media/video/ov2640_rk.c index d964b6d0e4aa..8a0ec04b234b 100755 --- a/drivers/media/video/ov2640_rk.c +++ b/drivers/media/video/ov2640_rk.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include 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) diff --git a/drivers/media/video/ov5640.c b/drivers/media/video/ov5640.c index cce82b537922..4823c2151146 100755 --- a/drivers/media/video/ov5640.c +++ b/drivers/media/video/ov5640.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #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) diff --git a/drivers/media/video/ov5640_for_td8801.c b/drivers/media/video/ov5640_for_td8801.c index 2c97f4dbd928..2f9bdd3185f0 100644 --- a/drivers/media/video/ov5640_for_td8801.c +++ b/drivers/media/video/ov5640_for_td8801.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "ov5640.h" static int debug = 1; diff --git a/drivers/media/video/ov7675.c b/drivers/media/video/ov7675.c index a94b2d1f8da4..e4a80fec0789 100755 --- a/drivers/media/video/ov7675.c +++ b/drivers/media/video/ov7675.c @@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/ov7690.c b/drivers/media/video/ov7690.c index 3e9884ec330b..f50d8b165046 100644 --- a/drivers/media/video/ov7690.c +++ b/drivers/media/video/ov7690.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 diff --git a/drivers/media/video/s5k6aa.c b/drivers/media/video/s5k6aa.c index cfe412a1733d..3d423404b948 100644 --- a/drivers/media/video/s5k6aa.c +++ b/drivers/media/video/s5k6aa.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include "s5k6aa.h" static int debug; diff --git a/drivers/media/video/sid130B.c b/drivers/media/video/sid130B.c index 0827afef9d8d..5bfbb0add506 100755 --- a/drivers/media/video/sid130B.c +++ b/drivers/media/video/sid130B.c @@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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()); diff --git a/drivers/media/video/siv120b.c b/drivers/media/video/siv120b.c index bfea1e0d6827..4b204e1ac084 100755 --- a/drivers/media/video/siv120b.c +++ b/drivers/media/video/siv120b.c @@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron #include #include #include -#include +#include 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 -- 2.34.1