media: i2c: fp5501: set phase index to 0 after reinit zoom/focus

Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I13af0263c587ed19f29f5f8f45e4ba9fd0f82204
This commit is contained in:
Hu Kejun
2021-07-06 10:02:24 +08:00
committed by Tao Huang
parent 39e7cf8ad3
commit 41dbb1d0d4

View File

@@ -386,6 +386,7 @@ static void motor_reinit_focus_pos(struct motor_dev *motor)
{
motor_reinit_focus(motor);
motor->focus.last_pos = 0;
motor->focus.phase_index = 0;
__v4l2_ctrl_modify_range(motor->focus_ctrl, 0,
motor->focus.step_max - motor->focus.reback,
1, 0);
@@ -408,6 +409,7 @@ static void motor_reinit_zoom_pos(struct motor_dev *motor)
{
motor_reinit_zoom(motor);
motor->zoom.last_pos = 0;
motor->zoom.phase_index = 0;
__v4l2_ctrl_modify_range(motor->zoom_ctrl, 0,
motor->zoom.step_max - motor->zoom.reback,
1, 0);