camera: delete compile warning
authorddl <ddl@rock-chips.com>
Tue, 21 May 2013 06:31:03 +0000 (14:31 +0800)
committerddl <ddl@rock-chips.com>
Tue, 21 May 2013 06:34:00 +0000 (14:34 +0800)
35 files changed:
arch/arm/plat-rk/include/plat/rk_camera.h
arch/arm/plat-rk/rk_camera.c
drivers/media/video/gc0307.c
drivers/media/video/gc0308.c
drivers/media/video/gc0309.c
drivers/media/video/gc0328.c
drivers/media/video/gc0329.c
drivers/media/video/gc2015.c
drivers/media/video/gc2035.c
drivers/media/video/generic_sensor.h
drivers/media/video/gt2005.c
drivers/media/video/hi253.c
drivers/media/video/hi704.c
drivers/media/video/hm2057.c
drivers/media/video/hm5065.c
drivers/media/video/mt9p111.c
drivers/media/video/mt9t111.c
drivers/media/video/nt99160_2way.c
drivers/media/video/nt99240_2way.c
drivers/media/video/nt99250.c
drivers/media/video/nt99252_3way.c
drivers/media/video/nt99340_2way.c
drivers/media/video/ov2655.c
drivers/media/video/ov2659.c
drivers/media/video/ov3640.c
drivers/media/video/ov3660.c
drivers/media/video/ov5640.c
drivers/media/video/ov5642.c
drivers/media/video/s5k5ca.c
drivers/media/video/s5k6aa.c
drivers/media/video/sid130B.c
drivers/media/video/siv120b.c
drivers/media/video/siv121d.c
drivers/media/video/sp0838.c
drivers/media/video/sp2518.c

index e282b27e7789a8158bb6f5768f2b25b7b181600f..ed3621320c9f70df4f9e6f22d3e6a593932be3b8 100755 (executable)
@@ -30,7 +30,9 @@
 #define RK_CAM_PLATFORM_DEV_ID_0 RK29_CAM_PLATFORM_DEV_ID
 #define RK_CAM_PLATFORM_DEV_ID_1 (RK_CAM_PLATFORM_DEV_ID_0+1)
 #define INVALID_VALUE -1
+#ifndef INVALID_GPIO
 #define INVALID_GPIO INVALID_VALUE
+#endif
 #define RK29_CAM_IO_SUCCESS 0
 #define RK29_CAM_EIO_INVALID -1
 #define RK29_CAM_EIO_REQUESTFAIL -2
index 4db26e754dff566887422b7a363709263e696b59..bb024f67f90c10bc2470257f50295fa9b8587e9c 100755 (executable)
@@ -308,7 +308,7 @@ static int rk_sensor_io_deinit(int sensor);
 static int rk_sensor_ioctrl(struct device *dev,enum rk29camera_ioctrl_cmd cmd, int on);\r
 static int rk_sensor_power(struct device *dev, int on);\r
 static int rk_sensor_register(void);\r
-static int rk_sensor_reset(struct device *dev);\r
+//static int rk_sensor_reset(struct device *dev);\r
 \r
 static int rk_sensor_powerdown(struct device *dev, int on);\r
 \r
@@ -1619,6 +1619,7 @@ static int rk_sensor_power(struct device *dev, int on)
     }\r
     return ret;\r
 }\r
+#if 0\r
 static int rk_sensor_reset(struct device *dev)\r
 {\r
 #if 0\r
@@ -1632,6 +1633,7 @@ static int rk_sensor_reset(struct device *dev)
 #endif\r
        return 0;\r
 }\r
+#endif\r
 static int rk_sensor_powerdown(struct device *dev, int on)\r
 {\r
        return rk_sensor_ioctrl(dev,Cam_PowerDown,on);\r
index 388f13a7b8f9762ef9945b94490c82ea85fe4219..720de7b2727d2db5ad9e1d16927245b69996f8d3 100755 (executable)
@@ -829,6 +829,7 @@ static      struct rk_sensor_reg sensor_Effect_Green[] =
                        {0x7c,0x00},\r
        SensorEnd\r
 };\r
+#if 0\r
 static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
 {\r
        {0x23,0x02},    \r
@@ -841,9 +842,10 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]=
        {0xb4,0x80},\r
        {0xba,0x00},\r
        {0xbb,0x00},\r
-       {0x00,0x00}\r
+       {0x00,0x00},\r
+       SensorEnd\r
 };\r
-\r
+#endif\r
 static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia,\r
        sensor_Effect_Bluish, sensor_Effect_Green,NULL,\r
 };\r
@@ -1244,7 +1246,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 77d1bdb59f95a990bd4c5b1203880d4056f512f4..5c3525f5d08d40d1cd731f5d40007b5a59d58c51 100755 (executable)
@@ -1130,8 +1130,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
-       return 0;\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
+    return 0;\r
 }\r
 \r
 /*\r
index f51ae770b9cc4236fa882448c49aeb1dc12b3976..35a9a40f40d7bdb6b14c23caa76b35c954c7952f 100755 (executable)
@@ -654,6 +654,7 @@ static      struct rk_sensor_reg sensor_Effect_Green[] =
        {0xbb,0xc0},\r
        SensorEnd\r
 };\r
+#if 0\r
 static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
 {\r
        {0x23,0x02},    \r
@@ -666,9 +667,11 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]=
        {0xb4,0x80},\r
        {0xba,0x00},\r
        {0xbb,0x00},\r
-       {0x00,0x00}\r
+       {0x00,0x00},\r
+       SensorEnd\r
+    \r
 };\r
-\r
+#endif\r
 static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia,\r
        sensor_Effect_Bluish, sensor_Effect_Green,NULL,\r
 };\r
@@ -1045,7 +1048,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index b7320baba6c85788733ceab03ade60718cfc9f0b..249598724488363cafd6a8097958e931f01e6718 100755 (executable)
@@ -950,7 +950,8 @@ static int sensor_focus_af_far_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos)\r
+{\r
        return 0;\r
 }\r
 \r
@@ -965,7 +966,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 84531240b3ef7f39e55cb9e4c07abb4e387bd641..2b51782585992578b82a8dd64600771010c3d043 100755 (executable)
@@ -661,6 +661,7 @@ static      struct rk_sensor_reg sensor_Effect_Green[] =
        {0xdb,0xc0}, \r
        SensorEnd\r
 };\r
+#if 0\r
 static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
 {\r
        {0x23,0x02},    \r
@@ -675,7 +676,7 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]=
        {0xbb,0x00},\r
        {0x00,0x00}\r
 };\r
-\r
+#endif\r
 static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia,\r
        sensor_Effect_Bluish, sensor_Effect_Green,NULL,\r
 };\r
@@ -1052,7 +1053,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index b0bfcd7af9a90656403d43d015cc2e09d050989b..097cf64d920d52a804df4f16abbc2184a214519d 100755 (executable)
@@ -1063,7 +1063,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 5fc88e617ada74ba21b43cbd570bdda11895f778..4c6eaa3266fce43325b9f65169fe7d81f21e2ef6 100755 (executable)
@@ -1406,8 +1406,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
-       return 0;\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
+    return 0;\r
 }\r
 \r
 /*\r
index 6cdae7211ba199d249e1523859b5f00c08404a84..5ea8e46a53652020ffde93bc87b30f5deaeea129 100755 (executable)
@@ -948,6 +948,9 @@ static inline int sensor_face_detect_default_cb(struct soc_camera_device *icd, s
     sensor_ops.set_bus_param = generic_sensor_set_bus_param;  \\r
        sensor_ops.query_bus_param = generic_sensor_query_bus_param;  \\r
  \\r
+    if (sizeof(sensor_ZoomSeqe)/sizeof(struct rk_sensor_reg *))\\r
+        sensor_ZoomSeqe[0] = NULL;\\r
+\\r
     if (CFG_FunChk(sensor_config,CFG_WhiteBalance)) { \\r
         sensor_v4l2ctrl_info_init(ctrls,V4L2_CID_DO_WHITE_BALANCE,V4L2_CTRL_TYPE_MENU,  \\r
                             "White Balance Control",0,4,1,0,sensor_v4l2ctrl_default_cb,sensor_WhiteBalanceSeqe);  \\r
index 72808030b99c658768069e1ab3b48c54d2dda462..ec5f9310a26982dd2cf9c2059142d07980901674 100755 (executable)
@@ -1206,7 +1206,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 7553bbadd81b7c89a89518c6a26363d54f8b42cf..068afcee19165bd7112fc031d4138d702b2c00b2 100755 (executable)
@@ -117,8 +117,9 @@ struct  flash_timer{
     struct soc_camera_device *icd;
        struct hrtimer timer;
 };
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
-
+#endif
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
 #ifdef CONFIG_HI253_USER_DEFINED_SERIES
@@ -1689,7 +1690,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static  struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -2191,7 +2192,7 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd
 sensor_power_end:
        return ret;
 }
-
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
        struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer);
     sensor_ioctrl(fps_timer->icd,Sensor_Flash,0);
@@ -2199,6 +2200,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
     return 0;
     
 }
+#endif
 static int sensor_init(struct v4l2_subdev *sd, u32 val)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
index 71951991d62ed4ff085dd284d3fa4adbe81045f4..d12c5eeec1b50bb5a78b47bc47a976a9f58d7a5c 100755 (executable)
@@ -106,8 +106,9 @@ struct  flash_timer{
     struct soc_camera_device *icd;
        struct hrtimer timer;
 };
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
-
+#endif
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
 #ifdef CONFIG_HI704_USER_DEFINED_SERIES
@@ -1127,7 +1128,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static  struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -1650,7 +1651,7 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd
 sensor_power_end:
        return ret;
 }
-
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
        struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer);
     sensor_ioctrl(fps_timer->icd,Sensor_Flash,0);
@@ -1658,6 +1659,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
     return 0;
     
 }
+#endif
 static int sensor_init(struct v4l2_subdev *sd, u32 val)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
index 49bdb5429ef2c61cd4c40b3f528f06abbd12743a..4b67fd3c39384f52a45a3f9bd269c4484c6d5510 100755 (executable)
@@ -1207,7 +1207,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 898a1dd39401622b133cd2bb65968a5e374f7746..b9e6d1f6569e18679d17dd48e3e74a7b137235f0 100755 (executable)
@@ -2562,7 +2562,7 @@ static int sensor_deactivate_cb(struct i2c_client *client)
 */\r
 static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)\r
 {\r
-       struct generic_sensor*sensor = to_generic_sensor(client);\r
+       //struct generic_sensor*sensor = to_generic_sensor(client);\r
        \r
        \r
        return 0;\r
@@ -2678,19 +2678,15 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client);
 \r
 static int sensor_focus_init_usr_cb(struct i2c_client *client)\r
 {\r
-    int ret = 0, cnt;\r
-    char state;\r
-    \r
-sensor_af_init_end:\r
-    SENSOR_DG("ret:0x%x ",__FUNCTION__,ret);\r
-    return ret;\r
+    return 0;\r
 }\r
 \r
 static int sensor_focus_af_single_usr_cb(struct i2c_client *client) \r
 {\r
        int ret = 0;
        char state,cnt=0;\r
-    struct specific_sensor *ssensor = to_generic_sensor(client);\r
+    struct generic_sensor *sensor = to_generic_sensor(client);\r
+    struct specific_sensor *ssensor = to_specific_sensor(sensor);\r
     \r
        ret |= sensor_write(client,AF_MODES_REG,0x03);
     ret |= sensor_write(client,AF_AUTOCMDS_REG,0x01);
@@ -2704,13 +2700,13 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client)
     }while ((state != 1) && (cnt<100));
 
     if (state == 1) {
-        sensor_read(client, AF_LENSPOS_REG_H,&ssensor->parameter.af_pos[0]);\r
-        sensor_read(client, AF_LENSPOS_REG_L,&ssensor->parameter.af_pos[1]);\r
+        sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]);\r
+        sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]);\r
     }
 
     SENSOR_DG("single focus, state: %d cnt: %d",state,cnt);\r
     \r
-sensor_af_single_end:\r
+//sensor_af_single_end:\r
        return ret;\r
 }\r
 \r
@@ -2727,7 +2723,8 @@ static int sensor_focus_af_far_usr_cb(struct i2c_client *client)
 \r
 static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos)\r
 {\r
-    struct specific_sensor *ssensor = to_generic_sensor(client);\r
+    struct generic_sensor *sensor = to_generic_sensor(client);\r
+    struct specific_sensor *ssensor = to_specific_sensor(sensor);\r
     \r
     sensor_write(client,0x070A, 0x00);\r
        sensor_write(client,0x0734, ssensor->parameter.af_pos[0]& 0xFF);\r
@@ -2744,20 +2741,21 @@ static int sensor_focus_af_const_usr_cb(struct i2c_client *client)
     int ret;\r
     \r
     ret = sensor_write(client, AF_MODES_REG, 0x01);\r
-sensor_af_const_end:\r
+//sensor_af_const_end:\r
        return ret;\r
 }\r
 static int sensor_focus_af_const_pause_usr_cb(struct i2c_client *client)\r
 {\r
     int ret = 0;\r
     char status = 0;\r
-    struct specific_sensor *ssensor = to_generic_sensor(client);\r
+    struct generic_sensor *sensor = to_generic_sensor(client);\r
+    struct specific_sensor *ssensor = to_specific_sensor(sensor);\r
     \r
     sensor_read(client, 0x07ae, &status);\r
 
     if (status == 1) {
-        sensor_read(client, AF_LENSPOS_REG_H,&ssensor->parameter.af_pos[0]);\r
-        sensor_read(client, AF_LENSPOS_REG_L,&ssensor->parameter.af_pos[1]);\r
+        sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]);\r
+        sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]);\r
     } else {
         sensor_focus_af_single_usr_cb(client);\r
     }\r
@@ -2820,7 +2818,7 @@ static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zon
        ret |= sensor_write(client, FACE_SIZE_XL, 0x40);
        ret |= sensor_write(client, FACE_SIZE_YH, 0x01);
        ret |= sensor_write(client, FACE_SIZE_YL, 0x40);\r
-sensor_af_zone_end:\r
+//sensor_af_zone_end:\r
        return ret;\r
 }\r
 \r
index 2b733fc0db9e4dd27e83a0a44d1641f3b023b501..8f6330f76c04ff53c8ee4a7ecc94012259e02265 100755 (executable)
@@ -2281,7 +2281,7 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client){
                SENSOR_DG("%s sensor auto focus trigger(0x%x) success! state: %d, cnt: %d\n",SENSOR_NAME_STRING(),
           sensor_af_trigger[0].val,reg.val,cnt);
        }
-sensor_af_single_end:
+//sensor_af_single_end:
        return ret;
 }
 
@@ -2327,7 +2327,7 @@ static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client,int *zone
 
     sensor_af_trigger[0].val = (zone_center_pos[0]<<8)|zone_center_pos[1];
   
-sensor_af_zone_end:
+//sensor_af_zone_end:
     return ret;
 }
 
index 6dffcddf6221ab162ae94bd70a476fae8787b745..4318b68a9434cc8c486e22e28b8bda0223b79682 100755 (executable)
@@ -5937,7 +5937,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -6639,14 +6639,14 @@ static int sensor_af_const(struct i2c_client *client)
 //sensor_af_const_end:
        return ret;
 }
-
+#if 0
 static int sensor_af_zoneupdate(struct i2c_client *client)
 {
        int ret = 0;
 
        return ret;
 }
-
+#endif
 static int sensor_af_init(struct i2c_client *client)
 {
        int ret = 0;
@@ -6961,6 +6961,7 @@ static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 
     return 0;
 }
+#if 0
 static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     bool ret = false;
@@ -6996,6 +6997,7 @@ static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
                SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height);
        return ret;
 }
+#endif
 static struct reginfo* sensor_fmt_catch(int set_w, int set_h, int *ret_w, int *ret_h)
 {
        struct reginfo *winseqe_set_addr = NULL;
index 265b292419601be4a52a9ca319a6dc562b7c53eb..a126e2d75e7419401eea2e7c1aa5050f83744dc5 100755 (executable)
@@ -311,6 +311,7 @@ static struct rk_sensor_reg sensor_fullres_lowfps_data[] ={
 \r
 \r
 /* Senor full resolution setting: recommand for capture */\r
+#if 0\r
 static struct rk_sensor_reg sensor_fullres_midfps_data[] ={\r
        {0x32BF, 0x60},\r
        {0x32C0, 0x74},\r
@@ -369,6 +370,7 @@ static struct rk_sensor_reg sensor_fullres_midfps_data[] ={
        {0x3060, 0x01},\r
        SensorEnd\r
 };\r
+#endif\r
 /* Senor full resolution setting: recommand for video */\r
 static struct rk_sensor_reg sensor_fullres_highfps_data[] ={\r
        {0x32BF, 0x60},\r
@@ -1045,8 +1047,6 @@ static struct soc_camera_ops sensor_ops;
 */\r
 static int sensor_activate_cb(struct i2c_client *client)\r
 {\r
-    u8 reg_val;\r
-\r
     SENSOR_DG("%s\n",__FUNCTION__);\r
 \r
        return 0;\r
@@ -1056,7 +1056,6 @@ static int sensor_activate_cb(struct i2c_client *client)
 */\r
 static int sensor_deactivate_cb(struct i2c_client *client)\r
 {\r
-       u8 reg_val;\r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
 \r
     SENSOR_DG("%s",__FUNCTION__);\r
@@ -1230,7 +1229,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index fb9a2d2434638222f2046a4e02f6d6c555821c03..6741bc9db584b45edbe82fc3612d480cdebaa0cd 100755 (executable)
@@ -828,8 +828,8 @@ static struct soc_camera_ops sensor_ops;
 */\r
 static int sensor_parameter_record(struct i2c_client *client)\r
 {\r
-       u8 ret_l,ret_m,ret_h;\r
-       int tp_l,tp_m,tp_h;\r
+       u8 ret_l,ret_h;\r
+       int tp_l,tp_h;\r
        \r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
        struct specific_sensor *spsensor = to_specific_sensor(sensor);\r
@@ -910,7 +910,7 @@ static int sensor_parameter_record(struct i2c_client *client)
 \r
 static int sensor_ae_transfer(struct i2c_client *client)\r
 {\r
-       unsigned int prev_line_len,cap_line_len,shutter;\r
+       //unsigned int prev_line_len,cap_line_len,shutter;\r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
        struct specific_sensor *spsensor = to_specific_sensor(sensor);\r
        int preview_ae_integration, capture_ae_integration;\r
@@ -971,8 +971,6 @@ static int sensor_ae_transfer(struct i2c_client *client)
 */\r
 static int sensor_activate_cb(struct i2c_client *client)\r
 {\r
-    u8 reg_val;\r
-\r
     SENSOR_DG("%s",__FUNCTION__);\r
        \r
        \r
@@ -983,7 +981,6 @@ static int sensor_activate_cb(struct i2c_client *client)
 */\r
 static int sensor_deactivate_cb(struct i2c_client *client)\r
 {\r
-       u8 reg_val;\r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
 \r
     SENSOR_DG("%s",__FUNCTION__);\r
@@ -1015,8 +1012,6 @@ static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefm
 */\r
 static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)\r
 {\r
-       u8 val;\r
-\r
     if (capture) {\r
                sensor_ae_transfer(client);\r
                printk("set fmt set!!!!!!!!!!!!");      \r
@@ -1169,7 +1164,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 8ba1261dca1f2e0153e6f23b62bcadff1841d073..7f7fd4f3f86b83bc9d71e8922f510bb168974b61 100755 (executable)
@@ -105,8 +105,9 @@ struct  flash_timer{
     struct soc_camera_device *icd;
        struct hrtimer timer;
 };
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
-
+#endif
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
 #ifdef CONFIG_NT99250_USER_DEFINED_SERIES
@@ -955,7 +956,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -1461,7 +1462,7 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd
 sensor_power_end:
        return ret;
 }
-
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
        struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer);
     sensor_ioctrl(fps_timer->icd,Sensor_Flash,0);
@@ -1469,6 +1470,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
     return 0;
     
 }
+#endif
 static int sensor_init(struct v4l2_subdev *sd, u32 val)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -1700,6 +1702,7 @@ static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 
     return 0;
 }
+#if 0
 static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     bool ret = false;
@@ -1735,6 +1738,7 @@ static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
                SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height);
        return ret;
 }
+#endif
 static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -2318,9 +2322,9 @@ static int sensor_g_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
 
 static int sensor_s_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
 {
-    struct i2c_client *client = v4l2_get_subdevdata(sd);
-    struct sensor *sensor = to_sensor(client);
-    struct soc_camera_device *icd = client->dev.platform_data;
+    //struct i2c_client *client = v4l2_get_subdevdata(sd);
+    //struct sensor *sensor = to_sensor(client);
+    //struct soc_camera_device *icd = client->dev.platform_data;
     const struct v4l2_queryctrl *qctrl;
 
 
@@ -2491,8 +2495,8 @@ static int sensor_g_ext_control(struct soc_camera_device *icd , struct v4l2_ext_
 static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_control *ext_ctrl)
 {
     const struct v4l2_queryctrl *qctrl;
-    struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
-    struct sensor *sensor = to_sensor(client);
+    //struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
+    //struct sensor *sensor = to_sensor(client);
     int val_offset;
 
     qctrl = soc_camera_find_qctrl(&sensor_ops, ext_ctrl->id);
index 0817e5a3c43b3666bb1fbe788e30861ade88b713..4ac781e8618d085383638b48e9bb737dca164ff0 100755 (executable)
@@ -902,54 +902,6 @@ static struct soc_camera_ops sensor_ops;
 * Please codeing your program here \r
 **********************************************************\r
 */\r
-static int sensor_parameter_record(struct i2c_client *client)\r
-{\r
-       u8 ret_l,ret_m,ret_h;\r
-       int tp_l,tp_m,tp_h;\r
-       \r
-       struct generic_sensor *sensor = to_generic_sensor(client);\r
-       struct specific_sensor *spsensor = to_specific_sensor(sensor);\r
-\r
-       sensor_read(client,0x3a00, &ret_l);\r
-       sensor_write(client,0x3a00, ret_l&0xfb);\r
-\r
-       sensor_write(client,0x3503,0x07);       //stop AE/AG\r
-\r
-       sensor_read(client,0x3500,&ret_h);\r
-       sensor_read(client,0x3501, &ret_m);\r
-       sensor_read(client,0x3502, &ret_l);\r
-       tp_l = ret_l;\r
-       tp_m = ret_m;\r
-       tp_h = ret_h;\r
-       spsensor->parameter.preview_exposure = ((tp_h<<12) & 0xF000) | ((tp_m<<4) & 0x0FF0) | ((tp_l>>4) & 0x0F);\r
-       \r
-       //Read back AGC Gain for preview\r
-       sensor_read(client,0x350b, &ret_l);\r
-       spsensor->parameter.preview_gain = ret_l;\r
-\r
-       spsensor->parameter.CapturePclk = 24000;\r
-       spsensor->parameter.PreviewPclk = 24000;\r
-       spsensor->parameter.PreviewDummyPixels = 0;\r
-       spsensor->parameter.CaptureDummyPixels = 0;\r
-       SENSOR_DG("Read 0x350b=0x%02x  PreviewExposure:%d 0x3500=0x%02x  0x3501=0x%02x 0x3502=0x%02x",\r
-                 ret_l,spsensor->parameter.preview_exposure,tp_h, tp_m, tp_l);\r
-       return 0;\r
-}\r
-#define OV2659_FULL_PERIOD_PIXEL_NUMS  (1940)  // default pixel#(w/o dummy pixels) in UXGA mode\r
-#define OV2659_FULL_PERIOD_LINE_NUMS   (1238)  // default line#(w/o dummy lines) in UXGA mode\r
-#define OV2659_PV_PERIOD_PIXEL_NUMS   (970)  // default pixel#(w/o dummy pixels) in SVGA mode\r
-#define OV2659_PV_PERIOD_LINE_NUMS       (618)   // default line#(w/o dummy lines) in SVGA mode\r
-\r
-/* SENSOR EXPOSURE LINE LIMITATION */\r
-#define OV2659_FULL_EXPOSURE_LIMITATION   (1236)\r
-#define OV2659_PV_EXPOSURE_LIMITATION    (618)\r
-\r
-// SENSOR UXGA SIZE\r
-#define OV2659_IMAGE_SENSOR_FULL_WIDTH   (1600)\r
-#define OV2659_IMAGE_SENSOR_FULL_HEIGHT   (1200)\r
-\r
-#define OV2659_FULL_GRAB_WIDTH                         (OV2659_IMAGE_SENSOR_FULL_WIDTH - 16)\r
-#define OV2659_FULL_GRAB_HEIGHT                        (OV2659_IMAGE_SENSOR_FULL_HEIGHT - 12)\r
 \r
 /*\r
 **********************************************************\r
@@ -962,8 +914,6 @@ static int sensor_parameter_record(struct i2c_client *client)
 */\r
 static int sensor_activate_cb(struct i2c_client *client)\r
 {\r
-    u8 reg_val;\r
-\r
     SENSOR_DG("%s",__FUNCTION__);      \r
        return 0;\r
 }\r
@@ -972,7 +922,6 @@ static int sensor_activate_cb(struct i2c_client *client)
 */\r
 static int sensor_deactivate_cb(struct i2c_client *client)\r
 {\r
-       u8 reg_val;\r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
 \r
     SENSOR_DG("%s",__FUNCTION__);\r
@@ -1147,7 +1096,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 15b486e02a557830563c427fe3264dcb9d83ac05..0df32184822c1ad209d01469e101446337a6d75e 100755 (executable)
@@ -959,8 +959,7 @@ static struct soc_camera_ops sensor_ops;
 */\r
 static int sensor_activate_cb(struct i2c_client *client)\r
 {\r
-    u8 reg_val;\r
-       struct soc_camera_device *icd = client->dev.platform_data;\r
+       //struct soc_camera_device *icd = client->dev.platform_data;\r
        //generic_sensor_ioctrl(icd, Sensor_PowerDown, 0);\r
 \r
     SENSOR_DG("%s",__FUNCTION__);\r
@@ -972,9 +971,8 @@ static int sensor_activate_cb(struct i2c_client *client)
 */\r
 static int sensor_deactivate_cb(struct i2c_client *client)\r
 {\r
-       u8 reg_val;\r
        struct generic_sensor *sensor = to_generic_sensor(client);\r
-       struct soc_camera_device *icd = client->dev.platform_data;\r
+       //struct soc_camera_device *icd = client->dev.platform_data;\r
 \r
     SENSOR_DG("%s",__FUNCTION__);\r
     \r
@@ -1153,7 +1151,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r
index 2ec61acb5bdcf03ada84efb85eb45fd4b0ed4a27..424e26e00969755f308adde8137d6f9764060390 100755 (executable)
@@ -1224,7 +1224,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -1753,7 +1753,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
        const struct v4l2_queryctrl *qctrl;
     const struct sensor_datafmt *fmt;
     char value;
-    int ret,pid = 0,i = 0,j=0;
+    int ret,pid = 0,i = 0,j=0,tmp_winseq_size;
     struct rk29camera_platform_data* tmp_plat_data =sensor->sensor_io_request;
     
     sensor_init_data_p = sensor_init_data;
@@ -1793,7 +1793,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
                }
            }
                //init winseq
-               int tmp_winseq_size = tmp_plat_data->sensor_init_data[i]->rk_sensor_winseq_size;
+               tmp_winseq_size = tmp_plat_data->sensor_init_data[i]->rk_sensor_winseq_size;
         if(tmp_winseq_size > 2){
                if(sizeof(struct reginfo) != sizeof(struct reginfo_t)){
                        if(sensor_init_winseq_board) {
@@ -1950,8 +1950,7 @@ sensor_INIT_ERR:
 
 static int sensor_deactivate(struct i2c_client *client)
 {
-       struct soc_camera_device *icd = client->dev.platform_data;
-       u8 reg_val;
+       struct soc_camera_device *icd = client->dev.platform_data;      
     struct sensor *sensor = to_sensor(client);
        SENSOR_DG("\n%s..%s.. Enter\n",SENSOR_NAME_STRING(),__FUNCTION__);
     
index 7508e29ecdb5646321de1067a3de70409671df42..40550a82ae6cd9a3138065e4926840e9f0b1932d 100755 (executable)
@@ -1099,8 +1099,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
-       return 0;\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
+    return 0;\r
 }\r
 \r
 /*\r
index 4e8ef0861e8b3e0d41e6e0b66373187cf2419a7e..fc5dd0345f45791463f3edb69b948b25b158cd78 100644 (file)
@@ -175,8 +175,9 @@ struct  flash_timer{
     struct soc_camera_device *icd;
        struct hrtimer timer;
 };
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
-
+#endif
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
 #ifdef CONFIG_OV5640_USER_DEFINED_SERIES
@@ -1685,7 +1686,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -2610,7 +2611,7 @@ static void sensor_af_workqueue(struct work_struct *work)
             SENSOR_TR("Unknow command(%d) in %s af workqueue!",sensor_work->cmd,SENSOR_NAME_STRING());
             break;
     } 
-set_end:
+//set_end:
     if (sensor_work->wait == false) {
         kfree((void*)sensor_work);
     } else {
@@ -2915,7 +2916,7 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd
 sensor_power_end:
        return ret;
 }
-
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
        struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer);
     sensor_ioctrl(fps_timer->icd,Sensor_Flash,0);
@@ -2923,7 +2924,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
     return 0;
     
 }
-
+#endif
 static int sensor_init(struct v4l2_subdev *sd, u32 val)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -2990,7 +2991,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
     }
        sensor_task_lock(client,0);
 
-    sensor->info_priv.winseqe_cur_addr  = SENSOR_INIT_WINSEQADR;
+    sensor->info_priv.winseqe_cur_addr  = (struct reginfo *)SENSOR_INIT_WINSEQADR;
        fmt = sensor_find_datafmt(SENSOR_INIT_PIXFMT,sensor_colour_fmts, ARRAY_SIZE(sensor_colour_fmts));
     if (!fmt) {
         SENSOR_TR("error: %s initial array colour fmts is not support!!",SENSOR_NAME_STRING());
@@ -3293,7 +3294,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
     }
     else
     {
-        winseqe_set_addr = SENSOR_INIT_WINSEQADR;               /* ddl@rock-chips.com : Sensor output smallest size if  isn't support app  */
+        winseqe_set_addr = (struct reginfo *)SENSOR_INIT_WINSEQADR;               /* ddl@rock-chips.com : Sensor output smallest size if  isn't support app  */
         set_w = SENSOR_INIT_WIDTH;
         set_h = SENSOR_INIT_HEIGHT;
                SENSOR_TR("\n %s..%s Format is Invalidate. pix->width = %d.. pix->height = %d\n",SENSOR_NAME_STRING(),__FUNCTION__,mf->width,mf->height);
@@ -3768,6 +3769,7 @@ static int sensor_set_digitalzoom(struct soc_camera_device *icd, const struct v4
 #endif
 
 #if CONFIG_SENSOR_Focus
+#if 0
 static int sensor_set_focus_absolute(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value)
 {
        struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
@@ -3795,6 +3797,7 @@ static int sensor_set_focus_absolute(struct soc_camera_device *icd, const struct
 
        return ret;
 }
+#endif
 static int sensor_set_focus_relative(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value)
 {
        struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
@@ -3840,8 +3843,8 @@ static int sensor_set_focus_mode(struct soc_camera_device *icd, const struct v4l
                                ret = sensor_af_workqueue_set(icd, WqCmd_af_single, 0, true);
                                break;
                        }
-
-                       /*case SENSOR_AF_MODE_MACRO:
+            /*
+                       case SENSOR_AF_MODE_MACRO:
                        {
                                ret = sensor_set_focus_absolute(icd, qctrl, 0xff);
                                break;
@@ -4126,7 +4129,7 @@ static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_c
     const struct v4l2_queryctrl *qctrl;
     struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
     struct sensor *sensor = to_sensor(client);
-    int val_offset,ret;
+    int val_offset;
 
     qctrl = soc_camera_find_qctrl(&sensor_ops, ext_ctrl->id);
 
index 26845554162d9c7204c7cd9189acd12b68ee6bc3..efee33bdcc214ce66c6b4abd9cad55a15f696e7f 100755 (executable)
@@ -1388,7 +1388,7 @@ static struct reginfo sensor_Zoom3[] =
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};\r
 #endif\r
 \r
-#if CONFIG_SENSOR_ISO\r
+#if 0\r
 static struct reginfo sensor_ISO100[] =\r
 {\r
 \r
@@ -1416,7 +1416,7 @@ static struct reginfo sensor_ISO800[] =
 static struct reginfo *sensor_ISOSeqe[] = {sensor_ISO100, sensor_ISO200, sensor_ISO400, sensor_ISO800, NULL,};\r
 #endif\r
 \r
-static const struct v4l2_querymenu sensor_menus[] =\r
+static struct v4l2_querymenu sensor_menus[] =\r
 {\r
        #if CONFIG_SENSOR_WhiteBalance\r
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},\r
@@ -1946,7 +1946,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
        const struct v4l2_queryctrl *qctrl;\r
        const struct sensor_datafmt *fmt;\r
 unsigned char value;\r
-int ret,pid = 0;\r
+int ret=0,pid = 0;\r
 \r
     SENSOR_DG("\n%s..%s.. \n",SENSOR_NAME_STRING(),__FUNCTION__);\r
 \r
index 394c5571180102a0587d130ba573a93b08341181..0310235fc00e71fa4f776f3d59d3e50f344b23fb 100755 (executable)
@@ -1098,7 +1098,7 @@ static int sensor_deactivate_cb(struct i2c_client *client)
 */\r
 static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)\r
 {\r
-       struct generic_sensor*sensor = to_generic_sensor(client);\r
+       //struct generic_sensor*sensor = to_generic_sensor(client);\r
        \r
        if (capture) {\r
                sensor_parameter_record(client);\r
@@ -1120,7 +1120,7 @@ static int sensor_check_id_usr_cb(struct i2c_client *client,struct rk_sensor_reg
 */\r
 static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)\r
 {\r
-       struct generic_sensor*sensor = to_generic_sensor(client);\r
+       //struct generic_sensor*sensor = to_generic_sensor(client);\r
        if (capture) {\r
                sensor_ae_transfer(client);\r
        }\r
@@ -1337,7 +1337,7 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client)
        int ret = 0;\r
        char state,cnt;\r
        struct af_cmdinfo cmdinfo;\r
-       char s_zone[5],i;\r
+       //char s_zone[5],i;\r
        cmdinfo.cmd_tag = 0x01;\r
        cmdinfo.validate_bit = 0x80;\r
        ret = sensor_af_cmdset(client, SingleFocus_Cmd, &cmdinfo);\r
@@ -1436,7 +1436,7 @@ static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zon
        struct af_cmdinfo cmdinfo;\r
        //int zone_tm_pos[4];\r
        int zone_center_pos[2];\r
-       struct generic_sensor*sensor = to_generic_sensor(client);    \r
+       //struct generic_sensor*sensor = to_generic_sensor(client);    \r
        \r
        if (zone_tm_pos) {\r
                zone_tm_pos[0] += 1000;\r
index bcdde053b4d7aeb479433d6bbc830736c94ce132..219e8906bcc976fe894a6f1abb319315dec3eca6 100755 (executable)
@@ -3063,7 +3063,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -3764,6 +3764,7 @@ static int sensor_af_const(struct i2c_client *client)
 sensor_af_const_end:
        return ret;
 }
+#if 0
 static int sensor_af_pause2capture(struct i2c_client *client)
 {
        int ret = 0;
@@ -3805,6 +3806,8 @@ static int sensor_af_pause2capture(struct i2c_client *client)
 sensor_af_pause_end:
        return ret;
 }
+#endif
+
 static int sensor_af_zoneupdate(struct i2c_client *client)
 {
        int ret = 0;
@@ -4022,7 +4025,7 @@ static void sensor_af_workqueue(struct work_struct *work)
             SENSOR_TR("Unknow command(%d) in %s af workqueue!",sensor_work->cmd,SENSOR_NAME_STRING());
             break;
     } 
-set_end:
+//set_end:
     if (sensor_work->wait == false) {
         kfree((void*)sensor_work);
     } else {
@@ -4308,6 +4311,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
     char value;
     int ret,pid = 0,i = 0,j=0;
     struct rk29camera_platform_data* tmp_plat_data =sensor->sensor_io_request;
+    int tmp_winseq_size;
     
     sensor_init_data_p = sensor_init_data;
        sensor_init_winseq_p = sensor_svga;
@@ -4344,7 +4348,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
                }
            }
                //init winseq
-               int tmp_winseq_size = tmp_plat_data->sensor_init_data[i]->rk_sensor_winseq_size;
+               tmp_winseq_size = tmp_plat_data->sensor_init_data[i]->rk_sensor_winseq_size;
         if(tmp_winseq_size > 2){
                if(sizeof(struct reginfo) != sizeof(struct reginfo_t)){
                        if(sensor_init_winseq_board) {
index dee10cd8e8eeae04ff445f4fa73546f6fc4751e3..87628b0c482cc8cb10e9ae5250217a9abe23e02b 100755 (executable)
@@ -19,8 +19,8 @@
 #include <media/v4l2-common.h>
 #include <media/v4l2-chip-ident.h>
 #include <media/soc_camera.h>
+//#include <mach/gpio.h>
 #include <plat/rk_camera.h>
-#include <mach/gpio.h>
 #include <linux/delay.h>
 #include "s5k5ca.h"
 
@@ -3434,10 +3434,12 @@ static struct reginfo sensor_720p[]=
 
        {SEQUENCE_END, 0x00}
 };
+#if 0
 static struct reginfo sensor_1080p[]=
 {
        {SEQUENCE_END, 0x00}
 };
+#endif
 /* 2592X1944 QSXGA */
 static struct reginfo sensor_qsxga[] =
 {
@@ -3950,7 +3952,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static  struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, 
@@ -4380,7 +4382,7 @@ static int sensor_write(struct i2c_client *client, u16 reg, u16 val)
        }
     return err;
 }
-
+#if 0
 /* sensor register read */
 static int sensor_read(struct i2c_client *client, u16 reg, u16 *val)
 {
@@ -4417,7 +4419,7 @@ static int sensor_read(struct i2c_client *client, u16 reg, u16 *val)
 
        return err;
 }
-
+#endif
 /* write a array of registers  */
 static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray)
 {
@@ -4688,7 +4690,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
         sensor->info_priv.flash = qctrl->default_value;
     #endif
     SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),((val == 0)?__FUNCTION__:"sensor_reinit"),icd->user_width,icd->user_height);
-sensor_init_end:    
+//sensor_init_end:    
     sensor->info_priv.funmodule_state |= SENSOR_INIT_IS_OK;
     return 0;
 sensor_INIT_ERR:
@@ -4805,6 +4807,7 @@ static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 
     return 0;
 }
+#if 0
 static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     bool ret = false;
@@ -4840,6 +4843,7 @@ static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
                SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height);
        return ret;
 }
+#endif
 static struct reginfo* sensor_fmt_catch(int set_w, int set_h, int *ret_w, int *ret_h)
 {
        struct reginfo *winseqe_set_addr = NULL;
@@ -4993,7 +4997,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
             goto sensor_s_fmt_end;
         }
 
-        sensor->info_priv.winseqe_cur_addr  = (unsigned int)winseqe_set_addr;
+        sensor->info_priv.winseqe_cur_addr  = (struct reginfo *)winseqe_set_addr;
 
         SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),__FUNCTION__,set_w,set_h);
     } else {
@@ -6001,7 +6005,7 @@ static int sensor_probe(struct i2c_client *client,
     struct soc_camera_device *icd = client->dev.platform_data;
     struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
     struct soc_camera_link *icl;
-    struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
+    //struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
     int ret;
 
     SENSOR_DG("\n%s..%s..%d..\n",__FUNCTION__,__FILE__,__LINE__);
index a7fd2e6f1014af7befdc6886019cd35493055299..b494797b7527c232360faaa80aa0783852c820c9 100755 (executable)
@@ -115,8 +115,9 @@ struct  flash_timer{
     struct soc_camera_device *icd;
        struct hrtimer timer;
 };
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer);
-
+#endif
 static struct  flash_timer flash_off_timer;
 //for user defined if user want to customize the series , zyc
 #ifdef CONFIG_S5K6AA_USER_DEFINED_SERIES
@@ -2292,10 +2293,13 @@ static struct reginfo sensor_720p[]=
 {
        {SEQUENCE_END, 0x00}
 };
+#if 0
 static struct reginfo sensor_1080p[]=
 {
        {SEQUENCE_END, 0x00}
 };
+#endif
+
 /* 2592X1944 QSXGA */
 static struct reginfo sensor_qsxga[] =
 {
@@ -2338,12 +2342,13 @@ static struct reginfo sensor_xga[] =
 {
        {SEQUENCE_END, 0x00}
 };
+#if 0
 /* 800X600 SVGA*/
 static struct reginfo sensor_svga[] =
 {
     {SEQUENCE_END, 0x0},
 };
-
+#endif
 /* 640X480 VGA */
 static struct reginfo sensor_vga[] =
 {
@@ -2733,7 +2738,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -2930,8 +2935,8 @@ static int sensor_suspend(struct soc_camera_device *icd, pm_message_t pm_msg);
 static int sensor_resume(struct soc_camera_device *icd);
 static int sensor_set_bus_param(struct soc_camera_device *icd,unsigned long flags);
 static unsigned long sensor_query_bus_param(struct soc_camera_device *icd);
-static int sensor_set_effect(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value);
-static int sensor_set_whiteBalance(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value);
+//static int sensor_set_effect(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value);
+//static int sensor_set_whiteBalance(struct soc_camera_device *icd, const struct v4l2_queryctrl *qctrl, int value);
 static int sensor_deactivate(struct i2c_client *client);
 
 static struct soc_camera_ops sensor_ops =
@@ -3138,7 +3143,7 @@ static int sensor_write(struct i2c_client *client, u16 reg, u16 val)
        }
     return err;
 }
-
+#if 0
 /* sensor register read */
 static int sensor_read(struct i2c_client *client, u16 reg, u16 *val)
 {
@@ -3175,7 +3180,7 @@ static int sensor_read(struct i2c_client *client, u16 reg, u16 *val)
 
        return err;
 }
-
+#endif
 /* write a array of registers  */
 static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray)
 {
@@ -3329,7 +3334,7 @@ static int sensor_ioctrl(struct soc_camera_device *icd,enum rk29sensor_power_cmd
 sensor_power_end:
        return ret;
 }
-
+#if CONFIG_SENSOR_Flash
 static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
        struct flash_timer *fps_timer = container_of(timer, struct flash_timer, timer);
     sensor_ioctrl(fps_timer->icd,Sensor_Flash,0);
@@ -3337,7 +3342,7 @@ static enum hrtimer_restart flash_off_func(struct hrtimer *timer){
     return 0;
     
 }
-
+#endif
 static int sensor_init(struct v4l2_subdev *sd, u32 val)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -3627,6 +3632,7 @@ static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 
     return 0;
 }
+#if 0
 static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     bool ret = false;
@@ -3662,6 +3668,7 @@ static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
                SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height);
        return ret;
 }
+#endif
 static struct reginfo* sensor_fmt_catch(int set_w, int set_h, int *ret_w, int *ret_h)
 {
        struct reginfo *winseqe_set_addr = NULL;
@@ -3815,7 +3822,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
             goto sensor_s_fmt_end;
         }
 
-        sensor->info_priv.winseqe_cur_addr  = (int)winseqe_set_addr;
+        sensor->info_priv.winseqe_cur_addr  = (struct reginfo*)winseqe_set_addr;
 
 
         SENSOR_DG("\n%s..%s.. icd->width = %d.. icd->height %d\n",SENSOR_NAME_STRING(),__FUNCTION__,set_w,set_h);
@@ -4380,8 +4387,8 @@ static int sensor_g_ext_control(struct soc_camera_device *icd , struct v4l2_ext_
 static int sensor_s_ext_control(struct soc_camera_device *icd, struct v4l2_ext_control *ext_ctrl)
 {
     const struct v4l2_queryctrl *qctrl;
-    struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
-    struct sensor *sensor = to_sensor(client);
+    //struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
+    //struct sensor *sensor = to_sensor(client);
     int val_offset;
 
     qctrl = soc_camera_find_qctrl(&sensor_ops, ext_ctrl->id);
index 13f75d6d51b9c47cd3b03126825a5f7b45654c60..a022859546cfcb993a463d208fa00ab26539bd9a 100755 (executable)
@@ -1897,7 +1897,7 @@ static struct reginfo sensor_Zoom3[] =
 };\r
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};\r
 #endif\r
-static const struct v4l2_querymenu sensor_menus[] =\r
+static  struct v4l2_querymenu sensor_menus[] =\r
 {\r
        #if CONFIG_SENSOR_WhiteBalance\r
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},\r
@@ -2250,7 +2250,7 @@ static int sensor_write(struct i2c_client *client, u8 reg, u8 val)
 \r
     return err;\r
 }\r
-\r
+#if 0\r
 /* sensor register read */\r
 static int sensor_read(struct i2c_client *client, u8 reg, u8 *val)\r
 {\r
@@ -2291,7 +2291,7 @@ static int sensor_read(struct i2c_client *client, u8 reg, u8 *val)
 \r
     return err;\r
 }\r
-\r
+#endif\r
 /* write a array of registers  */\r
 static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray)\r
 {\r
index ea88fc90f2bc6440bdb4abc31b74f0d36d320d07..6bc4b92ea13c1b2f90eb6064dc8c065513671f26 100755 (executable)
@@ -989,7 +989,7 @@ static struct reginfo sensor_Zoom3[] =
 };
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
 #endif
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
@@ -1687,6 +1687,7 @@ static int sensor_g_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 
     return 0;
 }
+#if 0
 static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     bool ret = false;
@@ -1722,6 +1723,7 @@ static bool sensor_fmt_videochk(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
                SENSOR_DG("%s %dx%d is video format\n", __FUNCTION__, mf->width, mf->height);
        return ret;
 }
+#endif
 static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
 {
     struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -2251,9 +2253,9 @@ static int sensor_g_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
 
 static int sensor_s_control(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
 {
-    struct i2c_client *client = v4l2_get_subdevdata(sd);
-    struct sensor *sensor = to_sensor(client);
-    struct soc_camera_device *icd = client->dev.platform_data;
+    //ruct i2c_client *client = v4l2_get_subdevdata(sd);
+    //ruct sensor *sensor = to_sensor(client);
+    //ruct soc_camera_device *icd = client->dev.platform_data;
     const struct v4l2_queryctrl *qctrl;
 
 
index 41a06b867160f25bd13199a974c05624c32c7f42..2e1b0361850aa424aa6069d316d7840513de16da 100755 (executable)
@@ -551,6 +551,7 @@ static  struct reginfo sensor_Effect_Negative[] =
     {0xB6, 0x20},\r
     {0xff,0xff} \r
 };\r
+/*\r
 static  struct reginfo sensor_Effect_Bluish[] =\r
 {\r
     {0x00,0x04}, \r
@@ -561,7 +562,7 @@ static  struct reginfo sensor_Effect_Bluish[] =
     {0xB8, 0x50},\r
     {0xff,0xff} \r
 };\r
-\r
+*/\r
 static  struct reginfo sensor_Effect_Green[] =\r
 {\r
     //  Greenish\r
@@ -798,7 +799,7 @@ static struct reginfo sensor_Zoom3[] =
 };\r
 static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};\r
 #endif\r
-static const struct v4l2_querymenu sensor_menus[] =\r
+static  struct v4l2_querymenu sensor_menus[] =\r
 {\r
        #if CONFIG_SENSOR_WhiteBalance\r
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},\r
index faf59cb4cb0847bdf44e7ae6ffd40a1d18ec4fca..9a19166e9eecd2356720e024836e68e5ed23e2a1 100755 (executable)
@@ -76,7 +76,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
 #define CONFIG_SENSOR_I2C_RDWRCHK   0
 
 #define SENSOR_BUS_PARAM  (SOCAM_MASTER | SOCAM_PCLK_SAMPLE_RISING |\
-                          SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH |\ 
+                          SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH |\
                           SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATAWIDTH_8  |SOCAM_MCLK_24MHZ)
 
 #define COLOR_TEMPERATURE_CLOUDY_DN  6500
@@ -1023,7 +1023,7 @@ static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Z
 
 
 ///=========sp0838-modify by sp_yjp,20120529=================
-static const struct v4l2_querymenu sensor_menus[] =
+static struct v4l2_querymenu sensor_menus[] =
 {
        #if CONFIG_SENSOR_WhiteBalance
     { .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 0,  .name = "auto",  .reserved = 0, }, {  .id = V4L2_CID_DO_WHITE_BALANCE,  .index = 1, .name = "incandescent",  .reserved = 0,},
index 89e1d60a4f0d2b64f15ad781101cdf13062dd7a9..3eb0b7fde3922be30247ffccb94ebe525ff04d63 100755 (executable)
@@ -1222,7 +1222,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){
        return 0;\r
 }\r
 \r
-static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){\r
+static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)\r
+{\r
        return 0;\r
 }\r
 \r