.type = V4L2_CTRL_TYPE_INTEGER,\r
.name = "Focus Control",\r
.minimum = 0,\r
- .maximum = 2,\r
+ .maximum = 0xff,\r
.step = 1,\r
.default_value = 0,\r
},\r
if (SENSOR_AF_CONTINUOUS == sensor->isp_priv_info.auto_focus) {\r
sensor_af_workqueue_set(icd,0,SENSOR_AF_CONTINUOUS_OFF,true);\r
}\r
- if (ext_ctrl->value == 1) {\r
+ if (ext_ctrl->value == 0xff) {\r
sensor_af_workqueue_set(icd,0,SENSOR_AF_MACRO,true);\r
sensor->isp_priv_info.auto_focus = SENSOR_AF_MACRO;\r
} else if(ext_ctrl->value == 0){\r
if (SENSOR_AF_CONTINUOUS == sensor->isp_priv_info.auto_focus) {\r
sensor_af_workqueue_set(icd,0,SENSOR_AF_CONTINUOUS_OFF,true);\r
}\r
- if (ext_ctrl->value == 1) {\r
+ if ((ext_ctrl->value == 1)||(sensor->isp_priv_info.auto_focus == SENSOR_AF_SINGLE)) {\r
sensor_af_workqueue_set(icd,0,SENSOR_AF_SINGLE,true);\r
sensor->isp_priv_info.auto_focus = SENSOR_AF_SINGLE;\r
} else if(ext_ctrl->value == 0){\r
if (sensor_set_face_detect(client, ext_ctrl->value) != 0)\r
return -EINVAL;\r
sensor->isp_priv_info.face = ext_ctrl->value;\r
- SENSOR_DG("%s flash is %x\n",SENSOR_NAME_STRING(), sensor->isp_priv_info.face);\r
+ SENSOR_DG("%s face value is %x\n",SENSOR_NAME_STRING(), sensor->isp_priv_info.face);\r
}\r
break;\r
}\r
/* ddl@rock-chips.com : if sensor support auto focus and flash, programer must run focus and flash code */\r
//qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FOCUS_AUTO);\r
//if (qctrl)\r
- sensor->isp_priv_info.auto_focus = SENSOR_AF_CONTINUOUS_OFF;\r
+ sensor->isp_priv_info.auto_focus = SENSOR_AF_MODE_CLOSE;\r
qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FACEDETECT);\r
if (qctrl)\r
sensor->isp_priv_info.face = qctrl->default_value;\r