From: ddl Date: Tue, 21 May 2013 06:31:03 +0000 (+0800) Subject: camera: delete compile warning X-Git-Tag: firefly_0821_release~7060 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=baf38c2cb3d88f5ebd205c76a3e8fcc3443f4f03;p=firefly-linux-kernel-4.4.55.git camera: delete compile warning --- diff --git a/arch/arm/plat-rk/include/plat/rk_camera.h b/arch/arm/plat-rk/include/plat/rk_camera.h index e282b27e7789..ed3621320c9f 100755 --- a/arch/arm/plat-rk/include/plat/rk_camera.h +++ b/arch/arm/plat-rk/include/plat/rk_camera.h @@ -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 diff --git a/arch/arm/plat-rk/rk_camera.c b/arch/arm/plat-rk/rk_camera.c index 4db26e754dff..bb024f67f90c 100755 --- a/arch/arm/plat-rk/rk_camera.c +++ b/arch/arm/plat-rk/rk_camera.c @@ -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); static int rk_sensor_power(struct device *dev, int on); static int rk_sensor_register(void); -static int rk_sensor_reset(struct device *dev); +//static int rk_sensor_reset(struct device *dev); static int rk_sensor_powerdown(struct device *dev, int on); @@ -1619,6 +1619,7 @@ static int rk_sensor_power(struct device *dev, int on) } return ret; } +#if 0 static int rk_sensor_reset(struct device *dev) { #if 0 @@ -1632,6 +1633,7 @@ static int rk_sensor_reset(struct device *dev) #endif return 0; } +#endif static int rk_sensor_powerdown(struct device *dev, int on) { return rk_sensor_ioctrl(dev,Cam_PowerDown,on); diff --git a/drivers/media/video/gc0307.c b/drivers/media/video/gc0307.c index 388f13a7b8f9..720de7b2727d 100755 --- a/drivers/media/video/gc0307.c +++ b/drivers/media/video/gc0307.c @@ -829,6 +829,7 @@ static struct rk_sensor_reg sensor_Effect_Green[] = {0x7c,0x00}, SensorEnd }; +#if 0 static struct rk_sensor_reg sensor_Effect_Grayscale[]= { {0x23,0x02}, @@ -841,9 +842,10 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]= {0xb4,0x80}, {0xba,0x00}, {0xbb,0x00}, - {0x00,0x00} + {0x00,0x00}, + SensorEnd }; - +#endif static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia, sensor_Effect_Bluish, sensor_Effect_Green,NULL, }; @@ -1244,7 +1246,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/gc0308.c b/drivers/media/video/gc0308.c index 77d1bdb59f95..5c3525f5d08d 100755 --- a/drivers/media/video/gc0308.c +++ b/drivers/media/video/gc0308.c @@ -1130,8 +1130,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ - return 0; +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ + return 0; } /* diff --git a/drivers/media/video/gc0309.c b/drivers/media/video/gc0309.c index f51ae770b9cc..35a9a40f40d7 100755 --- a/drivers/media/video/gc0309.c +++ b/drivers/media/video/gc0309.c @@ -654,6 +654,7 @@ static struct rk_sensor_reg sensor_Effect_Green[] = {0xbb,0xc0}, SensorEnd }; +#if 0 static struct rk_sensor_reg sensor_Effect_Grayscale[]= { {0x23,0x02}, @@ -666,9 +667,11 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]= {0xb4,0x80}, {0xba,0x00}, {0xbb,0x00}, - {0x00,0x00} + {0x00,0x00}, + SensorEnd + }; - +#endif static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia, sensor_Effect_Bluish, sensor_Effect_Green,NULL, }; @@ -1045,7 +1048,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/gc0328.c b/drivers/media/video/gc0328.c index b7320baba6c8..249598724488 100755 --- a/drivers/media/video/gc0328.c +++ b/drivers/media/video/gc0328.c @@ -950,7 +950,8 @@ static int sensor_focus_af_far_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos) +{ return 0; } @@ -965,7 +966,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/gc0329.c b/drivers/media/video/gc0329.c index 84531240b3ef..2b5178258599 100755 --- a/drivers/media/video/gc0329.c +++ b/drivers/media/video/gc0329.c @@ -661,6 +661,7 @@ static struct rk_sensor_reg sensor_Effect_Green[] = {0xdb,0xc0}, SensorEnd }; +#if 0 static struct rk_sensor_reg sensor_Effect_Grayscale[]= { {0x23,0x02}, @@ -675,7 +676,7 @@ static struct rk_sensor_reg sensor_Effect_Grayscale[]= {0xbb,0x00}, {0x00,0x00} }; - +#endif static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia, sensor_Effect_Bluish, sensor_Effect_Green,NULL, }; @@ -1052,7 +1053,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/gc2015.c b/drivers/media/video/gc2015.c index b0bfcd7af9a9..097cf64d920d 100755 --- a/drivers/media/video/gc2015.c +++ b/drivers/media/video/gc2015.c @@ -1063,7 +1063,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/gc2035.c b/drivers/media/video/gc2035.c index 5fc88e617ada..4c6eaa3266fc 100755 --- a/drivers/media/video/gc2035.c +++ b/drivers/media/video/gc2035.c @@ -1406,8 +1406,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ - return 0; +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ + return 0; } /* diff --git a/drivers/media/video/generic_sensor.h b/drivers/media/video/generic_sensor.h index 6cdae7211ba1..5ea8e46a5365 100755 --- a/drivers/media/video/generic_sensor.h +++ b/drivers/media/video/generic_sensor.h @@ -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; \ sensor_ops.query_bus_param = generic_sensor_query_bus_param; \ \ + if (sizeof(sensor_ZoomSeqe)/sizeof(struct rk_sensor_reg *))\ + sensor_ZoomSeqe[0] = NULL;\ +\ if (CFG_FunChk(sensor_config,CFG_WhiteBalance)) { \ sensor_v4l2ctrl_info_init(ctrls,V4L2_CID_DO_WHITE_BALANCE,V4L2_CTRL_TYPE_MENU, \ "White Balance Control",0,4,1,0,sensor_v4l2ctrl_default_cb,sensor_WhiteBalanceSeqe); \ diff --git a/drivers/media/video/gt2005.c b/drivers/media/video/gt2005.c index 72808030b99c..ec5f9310a269 100755 --- a/drivers/media/video/gt2005.c +++ b/drivers/media/video/gt2005.c @@ -1206,7 +1206,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/hi253.c b/drivers/media/video/hi253.c index 7553bbadd81b..068afcee1916 100755 --- a/drivers/media/video/hi253.c +++ b/drivers/media/video/hi253.c @@ -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); diff --git a/drivers/media/video/hi704.c b/drivers/media/video/hi704.c index 71951991d62e..d12c5eeec1b5 100755 --- a/drivers/media/video/hi704.c +++ b/drivers/media/video/hi704.c @@ -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); diff --git a/drivers/media/video/hm2057.c b/drivers/media/video/hm2057.c index 49bdb5429ef2..4b67fd3c3938 100755 --- a/drivers/media/video/hm2057.c +++ b/drivers/media/video/hm2057.c @@ -1207,7 +1207,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/hm5065.c b/drivers/media/video/hm5065.c index 898a1dd39401..b9e6d1f6569e 100755 --- a/drivers/media/video/hm5065.c +++ b/drivers/media/video/hm5065.c @@ -2562,7 +2562,7 @@ static int sensor_deactivate_cb(struct i2c_client *client) */ static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture) { - struct generic_sensor*sensor = to_generic_sensor(client); + //struct generic_sensor*sensor = to_generic_sensor(client); return 0; @@ -2678,19 +2678,15 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client); static int sensor_focus_init_usr_cb(struct i2c_client *client) { - int ret = 0, cnt; - char state; - -sensor_af_init_end: - SENSOR_DG("ret:0x%x ",__FUNCTION__,ret); - return ret; + return 0; } static int sensor_focus_af_single_usr_cb(struct i2c_client *client) { int ret = 0; char state,cnt=0; - struct specific_sensor *ssensor = to_generic_sensor(client); + struct generic_sensor *sensor = to_generic_sensor(client); + struct specific_sensor *ssensor = to_specific_sensor(sensor); 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]); - sensor_read(client, AF_LENSPOS_REG_L,&ssensor->parameter.af_pos[1]); + sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]); + sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]); } SENSOR_DG("single focus, state: %d cnt: %d",state,cnt); -sensor_af_single_end: +//sensor_af_single_end: return ret; } @@ -2727,7 +2723,8 @@ static int sensor_focus_af_far_usr_cb(struct i2c_client *client) static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos) { - struct specific_sensor *ssensor = to_generic_sensor(client); + struct generic_sensor *sensor = to_generic_sensor(client); + struct specific_sensor *ssensor = to_specific_sensor(sensor); sensor_write(client,0x070A, 0x00); sensor_write(client,0x0734, ssensor->parameter.af_pos[0]& 0xFF); @@ -2744,20 +2741,21 @@ static int sensor_focus_af_const_usr_cb(struct i2c_client *client) int ret; ret = sensor_write(client, AF_MODES_REG, 0x01); -sensor_af_const_end: +//sensor_af_const_end: return ret; } static int sensor_focus_af_const_pause_usr_cb(struct i2c_client *client) { int ret = 0; char status = 0; - struct specific_sensor *ssensor = to_generic_sensor(client); + struct generic_sensor *sensor = to_generic_sensor(client); + struct specific_sensor *ssensor = to_specific_sensor(sensor); sensor_read(client, 0x07ae, &status); if (status == 1) { - sensor_read(client, AF_LENSPOS_REG_H,&ssensor->parameter.af_pos[0]); - sensor_read(client, AF_LENSPOS_REG_L,&ssensor->parameter.af_pos[1]); + sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]); + sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]); } else { sensor_focus_af_single_usr_cb(client); } @@ -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); -sensor_af_zone_end: +//sensor_af_zone_end: return ret; } diff --git a/drivers/media/video/mt9p111.c b/drivers/media/video/mt9p111.c index 2b733fc0db9e..8f6330f76c04 100755 --- a/drivers/media/video/mt9p111.c +++ b/drivers/media/video/mt9p111.c @@ -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; } diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c index 6dffcddf6221..4318b68a9434 100755 --- a/drivers/media/video/mt9t111.c +++ b/drivers/media/video/mt9t111.c @@ -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; diff --git a/drivers/media/video/nt99160_2way.c b/drivers/media/video/nt99160_2way.c index 265b29241960..a126e2d75e74 100755 --- a/drivers/media/video/nt99160_2way.c +++ b/drivers/media/video/nt99160_2way.c @@ -311,6 +311,7 @@ static struct rk_sensor_reg sensor_fullres_lowfps_data[] ={ /* Senor full resolution setting: recommand for capture */ +#if 0 static struct rk_sensor_reg sensor_fullres_midfps_data[] ={ {0x32BF, 0x60}, {0x32C0, 0x74}, @@ -369,6 +370,7 @@ static struct rk_sensor_reg sensor_fullres_midfps_data[] ={ {0x3060, 0x01}, SensorEnd }; +#endif /* Senor full resolution setting: recommand for video */ static struct rk_sensor_reg sensor_fullres_highfps_data[] ={ {0x32BF, 0x60}, @@ -1045,8 +1047,6 @@ static struct soc_camera_ops sensor_ops; */ static int sensor_activate_cb(struct i2c_client *client) { - u8 reg_val; - SENSOR_DG("%s\n",__FUNCTION__); return 0; @@ -1056,7 +1056,6 @@ static int sensor_activate_cb(struct i2c_client *client) */ static int sensor_deactivate_cb(struct i2c_client *client) { - u8 reg_val; struct generic_sensor *sensor = to_generic_sensor(client); SENSOR_DG("%s",__FUNCTION__); @@ -1230,7 +1229,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/nt99240_2way.c b/drivers/media/video/nt99240_2way.c index fb9a2d243463..6741bc9db584 100755 --- a/drivers/media/video/nt99240_2way.c +++ b/drivers/media/video/nt99240_2way.c @@ -828,8 +828,8 @@ static struct soc_camera_ops sensor_ops; */ static int sensor_parameter_record(struct i2c_client *client) { - u8 ret_l,ret_m,ret_h; - int tp_l,tp_m,tp_h; + u8 ret_l,ret_h; + int tp_l,tp_h; struct generic_sensor *sensor = to_generic_sensor(client); struct specific_sensor *spsensor = to_specific_sensor(sensor); @@ -910,7 +910,7 @@ static int sensor_parameter_record(struct i2c_client *client) static int sensor_ae_transfer(struct i2c_client *client) { - unsigned int prev_line_len,cap_line_len,shutter; + //unsigned int prev_line_len,cap_line_len,shutter; struct generic_sensor *sensor = to_generic_sensor(client); struct specific_sensor *spsensor = to_specific_sensor(sensor); int preview_ae_integration, capture_ae_integration; @@ -971,8 +971,6 @@ static int sensor_ae_transfer(struct i2c_client *client) */ static int sensor_activate_cb(struct i2c_client *client) { - u8 reg_val; - SENSOR_DG("%s",__FUNCTION__); @@ -983,7 +981,6 @@ static int sensor_activate_cb(struct i2c_client *client) */ static int sensor_deactivate_cb(struct i2c_client *client) { - u8 reg_val; struct generic_sensor *sensor = to_generic_sensor(client); SENSOR_DG("%s",__FUNCTION__); @@ -1015,8 +1012,6 @@ static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefm */ static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture) { - u8 val; - if (capture) { sensor_ae_transfer(client); printk("set fmt set!!!!!!!!!!!!"); @@ -1169,7 +1164,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/nt99250.c b/drivers/media/video/nt99250.c index 8ba1261dca1f..7f7fd4f3f86b 100755 --- a/drivers/media/video/nt99250.c +++ b/drivers/media/video/nt99250.c @@ -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); diff --git a/drivers/media/video/nt99252_3way.c b/drivers/media/video/nt99252_3way.c index 0817e5a3c43b..4ac781e8618d 100755 --- a/drivers/media/video/nt99252_3way.c +++ b/drivers/media/video/nt99252_3way.c @@ -902,54 +902,6 @@ static struct soc_camera_ops sensor_ops; * Please codeing your program here ********************************************************** */ -static int sensor_parameter_record(struct i2c_client *client) -{ - u8 ret_l,ret_m,ret_h; - int tp_l,tp_m,tp_h; - - struct generic_sensor *sensor = to_generic_sensor(client); - struct specific_sensor *spsensor = to_specific_sensor(sensor); - - sensor_read(client,0x3a00, &ret_l); - sensor_write(client,0x3a00, ret_l&0xfb); - - sensor_write(client,0x3503,0x07); //stop AE/AG - - sensor_read(client,0x3500,&ret_h); - sensor_read(client,0x3501, &ret_m); - sensor_read(client,0x3502, &ret_l); - tp_l = ret_l; - tp_m = ret_m; - tp_h = ret_h; - spsensor->parameter.preview_exposure = ((tp_h<<12) & 0xF000) | ((tp_m<<4) & 0x0FF0) | ((tp_l>>4) & 0x0F); - - //Read back AGC Gain for preview - sensor_read(client,0x350b, &ret_l); - spsensor->parameter.preview_gain = ret_l; - - spsensor->parameter.CapturePclk = 24000; - spsensor->parameter.PreviewPclk = 24000; - spsensor->parameter.PreviewDummyPixels = 0; - spsensor->parameter.CaptureDummyPixels = 0; - SENSOR_DG("Read 0x350b=0x%02x PreviewExposure:%d 0x3500=0x%02x 0x3501=0x%02x 0x3502=0x%02x", - ret_l,spsensor->parameter.preview_exposure,tp_h, tp_m, tp_l); - return 0; -} -#define OV2659_FULL_PERIOD_PIXEL_NUMS (1940) // default pixel#(w/o dummy pixels) in UXGA mode -#define OV2659_FULL_PERIOD_LINE_NUMS (1238) // default line#(w/o dummy lines) in UXGA mode -#define OV2659_PV_PERIOD_PIXEL_NUMS (970) // default pixel#(w/o dummy pixels) in SVGA mode -#define OV2659_PV_PERIOD_LINE_NUMS (618) // default line#(w/o dummy lines) in SVGA mode - -/* SENSOR EXPOSURE LINE LIMITATION */ -#define OV2659_FULL_EXPOSURE_LIMITATION (1236) -#define OV2659_PV_EXPOSURE_LIMITATION (618) - -// SENSOR UXGA SIZE -#define OV2659_IMAGE_SENSOR_FULL_WIDTH (1600) -#define OV2659_IMAGE_SENSOR_FULL_HEIGHT (1200) - -#define OV2659_FULL_GRAB_WIDTH (OV2659_IMAGE_SENSOR_FULL_WIDTH - 16) -#define OV2659_FULL_GRAB_HEIGHT (OV2659_IMAGE_SENSOR_FULL_HEIGHT - 12) /* ********************************************************** @@ -962,8 +914,6 @@ static int sensor_parameter_record(struct i2c_client *client) */ static int sensor_activate_cb(struct i2c_client *client) { - u8 reg_val; - SENSOR_DG("%s",__FUNCTION__); return 0; } @@ -972,7 +922,6 @@ static int sensor_activate_cb(struct i2c_client *client) */ static int sensor_deactivate_cb(struct i2c_client *client) { - u8 reg_val; struct generic_sensor *sensor = to_generic_sensor(client); SENSOR_DG("%s",__FUNCTION__); @@ -1147,7 +1096,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/nt99340_2way.c b/drivers/media/video/nt99340_2way.c index 15b486e02a55..0df32184822c 100755 --- a/drivers/media/video/nt99340_2way.c +++ b/drivers/media/video/nt99340_2way.c @@ -959,8 +959,7 @@ static struct soc_camera_ops sensor_ops; */ static int sensor_activate_cb(struct i2c_client *client) { - u8 reg_val; - struct soc_camera_device *icd = client->dev.platform_data; + //struct soc_camera_device *icd = client->dev.platform_data; //generic_sensor_ioctrl(icd, Sensor_PowerDown, 0); SENSOR_DG("%s",__FUNCTION__); @@ -972,9 +971,8 @@ static int sensor_activate_cb(struct i2c_client *client) */ static int sensor_deactivate_cb(struct i2c_client *client) { - u8 reg_val; struct generic_sensor *sensor = to_generic_sensor(client); - struct soc_camera_device *icd = client->dev.platform_data; + //struct soc_camera_device *icd = client->dev.platform_data; SENSOR_DG("%s",__FUNCTION__); @@ -1153,7 +1151,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; } diff --git a/drivers/media/video/ov2655.c b/drivers/media/video/ov2655.c index 2ec61acb5bdc..424e26e00969 100755 --- a/drivers/media/video/ov2655.c +++ b/drivers/media/video/ov2655.c @@ -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__); diff --git a/drivers/media/video/ov2659.c b/drivers/media/video/ov2659.c index 7508e29ecdb5..40550a82ae6c 100755 --- a/drivers/media/video/ov2659.c +++ b/drivers/media/video/ov2659.c @@ -1099,8 +1099,9 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ - return 0; +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ + return 0; } /* diff --git a/drivers/media/video/ov3640.c b/drivers/media/video/ov3640.c index 4e8ef0861e8b..fc5dd0345f45 100644 --- a/drivers/media/video/ov3640.c +++ b/drivers/media/video/ov3640.c @@ -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); diff --git a/drivers/media/video/ov3660.c b/drivers/media/video/ov3660.c index 26845554162d..efee33bdcc21 100755 --- a/drivers/media/video/ov3660.c +++ b/drivers/media/video/ov3660.c @@ -1388,7 +1388,7 @@ static struct reginfo sensor_Zoom3[] = static struct reginfo *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,}; #endif -#if CONFIG_SENSOR_ISO +#if 0 static struct reginfo sensor_ISO100[] = { @@ -1416,7 +1416,7 @@ static struct reginfo sensor_ISO800[] = static struct reginfo *sensor_ISOSeqe[] = {sensor_ISO100, sensor_ISO200, sensor_ISO400, sensor_ISO800, 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,}, @@ -1946,7 +1946,7 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val) const struct v4l2_queryctrl *qctrl; const struct sensor_datafmt *fmt; unsigned char value; -int ret,pid = 0; +int ret=0,pid = 0; SENSOR_DG("\n%s..%s.. \n",SENSOR_NAME_STRING(),__FUNCTION__); diff --git a/drivers/media/video/ov5640.c b/drivers/media/video/ov5640.c index 394c55711801..0310235fc00e 100755 --- a/drivers/media/video/ov5640.c +++ b/drivers/media/video/ov5640.c @@ -1098,7 +1098,7 @@ static int sensor_deactivate_cb(struct i2c_client *client) */ static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture) { - struct generic_sensor*sensor = to_generic_sensor(client); + //struct generic_sensor*sensor = to_generic_sensor(client); if (capture) { sensor_parameter_record(client); @@ -1120,7 +1120,7 @@ static int sensor_check_id_usr_cb(struct i2c_client *client,struct rk_sensor_reg */ static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture) { - struct generic_sensor*sensor = to_generic_sensor(client); + //struct generic_sensor*sensor = to_generic_sensor(client); if (capture) { sensor_ae_transfer(client); } @@ -1337,7 +1337,7 @@ static int sensor_focus_af_single_usr_cb(struct i2c_client *client) int ret = 0; char state,cnt; struct af_cmdinfo cmdinfo; - char s_zone[5],i; + //char s_zone[5],i; cmdinfo.cmd_tag = 0x01; cmdinfo.validate_bit = 0x80; ret = sensor_af_cmdset(client, SingleFocus_Cmd, &cmdinfo); @@ -1436,7 +1436,7 @@ static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zon struct af_cmdinfo cmdinfo; //int zone_tm_pos[4]; int zone_center_pos[2]; - struct generic_sensor*sensor = to_generic_sensor(client); + //struct generic_sensor*sensor = to_generic_sensor(client); if (zone_tm_pos) { zone_tm_pos[0] += 1000; diff --git a/drivers/media/video/ov5642.c b/drivers/media/video/ov5642.c index bcdde053b4d7..219e8906bcc9 100755 --- a/drivers/media/video/ov5642.c +++ b/drivers/media/video/ov5642.c @@ -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) { diff --git a/drivers/media/video/s5k5ca.c b/drivers/media/video/s5k5ca.c index dee10cd8e8ee..87628b0c482c 100755 --- a/drivers/media/video/s5k5ca.c +++ b/drivers/media/video/s5k5ca.c @@ -19,8 +19,8 @@ #include #include #include +//#include #include -#include #include #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__); diff --git a/drivers/media/video/s5k6aa.c b/drivers/media/video/s5k6aa.c index a7fd2e6f1014..b494797b7527 100755 --- a/drivers/media/video/s5k6aa.c +++ b/drivers/media/video/s5k6aa.c @@ -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); diff --git a/drivers/media/video/sid130B.c b/drivers/media/video/sid130B.c index 13f75d6d51b9..a022859546cf 100755 --- a/drivers/media/video/sid130B.c +++ b/drivers/media/video/sid130B.c @@ -1897,7 +1897,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,}, @@ -2250,7 +2250,7 @@ static int sensor_write(struct i2c_client *client, u8 reg, u8 val) return err; } - +#if 0 /* sensor register read */ static int sensor_read(struct i2c_client *client, u8 reg, u8 *val) { @@ -2291,7 +2291,7 @@ static int sensor_read(struct i2c_client *client, u8 reg, u8 *val) return err; } - +#endif /* write a array of registers */ static int sensor_write_array(struct i2c_client *client, struct reginfo *regarray) { diff --git a/drivers/media/video/siv120b.c b/drivers/media/video/siv120b.c index ea88fc90f2bc..6bc4b92ea13c 100755 --- a/drivers/media/video/siv120b.c +++ b/drivers/media/video/siv120b.c @@ -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; diff --git a/drivers/media/video/siv121d.c b/drivers/media/video/siv121d.c index 41a06b867160..2e1b0361850a 100755 --- a/drivers/media/video/siv121d.c +++ b/drivers/media/video/siv121d.c @@ -551,6 +551,7 @@ static struct reginfo sensor_Effect_Negative[] = {0xB6, 0x20}, {0xff,0xff} }; +/* static struct reginfo sensor_Effect_Bluish[] = { {0x00,0x04}, @@ -561,7 +562,7 @@ static struct reginfo sensor_Effect_Bluish[] = {0xB8, 0x50}, {0xff,0xff} }; - +*/ static struct reginfo sensor_Effect_Green[] = { // Greenish @@ -798,7 +799,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,}, diff --git a/drivers/media/video/sp0838.c b/drivers/media/video/sp0838.c index faf59cb4cb08..9a19166e9eec 100755 --- a/drivers/media/video/sp0838.c +++ b/drivers/media/video/sp0838.c @@ -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,}, diff --git a/drivers/media/video/sp2518.c b/drivers/media/video/sp2518.c index 89e1d60a4f0d..3eb0b7fde392 100755 --- a/drivers/media/video/sp2518.c +++ b/drivers/media/video/sp2518.c @@ -1222,7 +1222,8 @@ static int sensor_focus_af_close_usr_cb(struct i2c_client *client){ return 0; } -static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client){ +static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos) +{ return 0; }