msm-camera: power enable support for autofocus actuator
Change-Id: I17c4bf3f216c6f9406ade4c3d4deedddc8b224c3 Signed-off-by: Rajakumar Govindaram <crajaku@codeaurora.org>
This commit is contained in:
committed by
Linux Build Service Account
parent
627f4315d9
commit
df6af9cd24
@@ -324,7 +324,8 @@ struct msm_sensor_ctrl {
|
||||
|
||||
struct msm_actuator_ctrl {
|
||||
int (*a_init_table)(void);
|
||||
int (*a_power_down)(void);
|
||||
int (*a_power_up)(void *);
|
||||
int (*a_power_down)(void *);
|
||||
int (*a_create_subdevice)(void *, void *);
|
||||
int (*a_config)(void __user *);
|
||||
};
|
||||
|
||||
@@ -2407,6 +2407,7 @@ device_fail:
|
||||
adapter = NULL;
|
||||
probe_fail:
|
||||
actctrl->a_init_table = NULL;
|
||||
actctrl->a_power_up = NULL;
|
||||
actctrl->a_power_down = NULL;
|
||||
actctrl->a_config = NULL;
|
||||
actctrl->a_create_subdevice = NULL;
|
||||
|
||||
@@ -543,6 +543,15 @@ static int msm_mctl_open(struct msm_cam_media_controller *p_mctl,
|
||||
goto msm_open_done;
|
||||
}
|
||||
|
||||
if (sync->actctrl.a_power_up)
|
||||
rc = sync->actctrl.a_power_up(
|
||||
sync->sdata->actuator_info);
|
||||
|
||||
if (rc < 0) {
|
||||
pr_err("%s: act power failed:%d\n", __func__, rc);
|
||||
goto msm_open_done;
|
||||
}
|
||||
|
||||
pm_qos_add_request(&p_mctl->pm_qos_req_list,
|
||||
PM_QOS_CPU_DMA_LATENCY,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
@@ -576,7 +585,7 @@ static int msm_mctl_release(struct msm_cam_media_controller *p_mctl)
|
||||
VIDIOC_MSM_CSIPHY_RELEASE, NULL);
|
||||
|
||||
if (p_mctl->sync.actctrl.a_power_down)
|
||||
p_mctl->sync.actctrl.a_power_down();
|
||||
p_mctl->sync.actctrl.a_power_down(sync->sdata->actuator_info);
|
||||
|
||||
if (p_mctl->sync.sctrl.s_release)
|
||||
p_mctl->sync.sctrl.s_release();
|
||||
|
||||
Reference in New Issue
Block a user