#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
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
}\r
return ret;\r
}\r
+#if 0\r
static int rk_sensor_reset(struct device *dev)\r
{\r
#if 0\r
#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
{0x7c,0x00},\r
SensorEnd\r
};\r
+#if 0\r
static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
{\r
{0x23,0x02}, \r
{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
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
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
{0xbb,0xc0},\r
SensorEnd\r
};\r
+#if 0\r
static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
{\r
{0x23,0x02}, \r
{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
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
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
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
{0xdb,0xc0}, \r
SensorEnd\r
};\r
+#if 0\r
static struct rk_sensor_reg sensor_Effect_Grayscale[]=\r
{\r
{0x23,0x02}, \r
{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
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
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
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
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
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
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
};
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,},
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);
return 0;
}
+#endif
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
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
};
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,},
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);
return 0;
}
+#endif
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
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
*/\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
\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);
}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
\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
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
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
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;
}
sensor_af_trigger[0].val = (zone_center_pos[0]<<8)|zone_center_pos[1];
-sensor_af_zone_end:
+//sensor_af_zone_end:
return ret;
}
};
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,},
//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;
return 0;
}
+#if 0
static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
bool ret = false;
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;
\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
{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
*/\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
*/\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
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
*/\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
\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
*/\r
static int sensor_activate_cb(struct i2c_client *client)\r
{\r
- u8 reg_val;\r
-\r
SENSOR_DG("%s",__FUNCTION__);\r
\r
\r
*/\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
*/\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
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
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
};
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,},
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);
return 0;
}
+#endif
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
return 0;
}
+#if 0
static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
bool ret = false;
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);
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;
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);
* 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
*/\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
*/\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
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
*/\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
*/\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
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
};
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,},
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;
}
}
//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) {
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__);
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
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
};
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,},
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 {
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);
return 0;
}
-
+#endif
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
}
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());
}
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);
#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));
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));
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;
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);
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
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
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
*/\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
*/\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
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
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
};
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,},
sensor_af_const_end:
return ret;
}
+#if 0
static int sensor_af_pause2capture(struct i2c_client *client)
{
int ret = 0;
sensor_af_pause_end:
return ret;
}
+#endif
+
static int sensor_af_zoneupdate(struct i2c_client *client)
{
int ret = 0;
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 {
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;
}
}
//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) {
#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"
{SEQUENCE_END, 0x00}
};
+#if 0
static struct reginfo sensor_1080p[]=
{
{SEQUENCE_END, 0x00}
};
+#endif
/* 2592X1944 QSXGA */
static struct reginfo sensor_qsxga[] =
{
};
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, },
}
return err;
}
-
+#if 0
/* sensor register read */
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)
{
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:
return 0;
}
+#if 0
static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
bool ret = false;
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;
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 {
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__);
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
{
{SEQUENCE_END, 0x00}
};
+#if 0
static struct reginfo sensor_1080p[]=
{
{SEQUENCE_END, 0x00}
};
+#endif
+
/* 2592X1944 QSXGA */
static struct reginfo sensor_qsxga[] =
{
{
{SEQUENCE_END, 0x00}
};
+#if 0
/* 800X600 SVGA*/
static struct reginfo sensor_svga[] =
{
{SEQUENCE_END, 0x0},
};
-
+#endif
/* 640X480 VGA */
static struct reginfo sensor_vga[] =
{
};
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,},
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 =
}
return err;
}
-
+#if 0
/* sensor register read */
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)
{
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);
return 0;
}
-
+#endif
static int sensor_init(struct v4l2_subdev *sd, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
return 0;
}
+#if 0
static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
bool ret = false;
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;
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);
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);
};\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
\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
\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
};
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,},
return 0;
}
+#if 0
static bool sensor_fmt_capturechk(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
bool ret = false;
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);
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;
{0xB6, 0x20},\r
{0xff,0xff} \r
};\r
+/*\r
static struct reginfo sensor_Effect_Bluish[] =\r
{\r
{0x00,0x04}, \r
{0xB8, 0x50},\r
{0xff,0xff} \r
};\r
-\r
+*/\r
static struct reginfo sensor_Effect_Green[] =\r
{\r
// Greenish\r
};\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
#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
///=========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,},
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