Loading drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c +26 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ DEFINE_MSM_MUTEX(msm_actuator_mutex); #undef CDBG #define CDBG(fmt, args...) pr_debug(fmt, ##args) #define PARK_LENS_LONG_STEP 7 #define PARK_LENS_MID_STEP 5 #define PARK_LENS_SMALL_STEP 3 static struct v4l2_file_operations msm_actuator_v4l2_subdev_fops; static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); Loading Loading @@ -387,8 +391,28 @@ static int32_t msm_actuator_park_lens(struct msm_actuator_ctrl_t *a_ctrl) next_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; while (next_lens_pos) { next_lens_pos = (next_lens_pos > a_ctrl->park_lens.max_step) ? (next_lens_pos - a_ctrl->park_lens.max_step) : 0; /* conditions which help to reduce park lens time */ if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_LONG_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_LONG_STEP); } else if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_MID_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_MID_STEP); } else if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_SMALL_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_SMALL_STEP); } else { next_lens_pos = (next_lens_pos > a_ctrl->park_lens.max_step) ? (next_lens_pos - a_ctrl->park_lens. max_step) : 0; } a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, next_lens_pos, a_ctrl->park_lens.hw_params, a_ctrl->park_lens.damping_delay); Loading Loading
drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c +26 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ DEFINE_MSM_MUTEX(msm_actuator_mutex); #undef CDBG #define CDBG(fmt, args...) pr_debug(fmt, ##args) #define PARK_LENS_LONG_STEP 7 #define PARK_LENS_MID_STEP 5 #define PARK_LENS_SMALL_STEP 3 static struct v4l2_file_operations msm_actuator_v4l2_subdev_fops; static int32_t msm_actuator_power_up(struct msm_actuator_ctrl_t *a_ctrl); static int32_t msm_actuator_power_down(struct msm_actuator_ctrl_t *a_ctrl); Loading Loading @@ -387,8 +391,28 @@ static int32_t msm_actuator_park_lens(struct msm_actuator_ctrl_t *a_ctrl) next_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos]; while (next_lens_pos) { next_lens_pos = (next_lens_pos > a_ctrl->park_lens.max_step) ? (next_lens_pos - a_ctrl->park_lens.max_step) : 0; /* conditions which help to reduce park lens time */ if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_LONG_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_LONG_STEP); } else if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_MID_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_MID_STEP); } else if (next_lens_pos > (a_ctrl->park_lens.max_step * PARK_LENS_SMALL_STEP)) { next_lens_pos = next_lens_pos - (a_ctrl->park_lens.max_step * PARK_LENS_SMALL_STEP); } else { next_lens_pos = (next_lens_pos > a_ctrl->park_lens.max_step) ? (next_lens_pos - a_ctrl->park_lens. max_step) : 0; } a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, next_lens_pos, a_ctrl->park_lens.hw_params, a_ctrl->park_lens.damping_delay); Loading