From b7b5e8bc55ead5e40f3614ce2cd680badc02d1ec Mon Sep 17 00:00:00 2001 From: wangshuo18 Date: Wed, 21 Apr 2021 11:25:02 +0800 Subject: [PATCH] cam: Add actuator standalone diver for berlin -To eliminate the resonance noise during system vibrator vibrating, set actuator to specified DAC position(480 on GT9772), then the resonance noise can be obviously improved. To achieve the conbination between vibrator and camera AF actuator,we implemnte: - Actuator separately control during camera power off. - Actuator policy to avoid vibrating disturb normal camera AF. - reinitialize when the safe_pos parameter is manually configured. Change-Id: I8f674eb441e8382f4de77acbca27179f8302139e Signed-off-by: wangshuo18 Reviewed-on: https://gerrit.mot.com/1928778 Reviewed-by: Shuo Wang Tested-by: Jira Key Reviewed-by: Long Cheng SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Zhenxin Xi Submit-Approved: Jira Key --- .../cam_actuator/mot_actuator.c | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/cam_sensor_module/cam_actuator/mot_actuator.c b/drivers/cam_sensor_module/cam_actuator/mot_actuator.c index 03d2bd9f3591..d76a8ec3cf4f 100644 --- a/drivers/cam_sensor_module/cam_actuator/mot_actuator.c +++ b/drivers/cam_sensor_module/cam_actuator/mot_actuator.c @@ -51,6 +51,7 @@ typedef enum { typedef enum { MOT_DEVICE_NIO, MOT_DEVICE_BERLNA, + MOT_DEVICE_BERLIN, MOT_DEVICE_NUM, } mot_dev_type; @@ -207,6 +208,23 @@ static const mot_dev_info mot_dev_list[MOT_DEVICE_NUM] = { }, }, }, + { + .dev_type = MOT_DEVICE_BERLIN, + .actuator_num = 1, + .dev_name = "berlin", + .actuator_info = { + [0] = { + .actuator_type = MOT_ACTUATOR_GT9772, + .dac_pos = 480, + .cci_addr = 0x0c, + .cci_dev = 0x01, + .cci_master = 0x1, + .regulator_list = {"ldo7", "ldo5"}, + .regulator_volt_uv = {1800000, 2800000}, + .park_lens_needed = true, + }, + }, + }, }; static uint32_t mot_device_index = MOT_DEVICE_NUM; @@ -881,7 +899,8 @@ static ssize_t mot_actuator_safe_pos_store(struct device *dev, } lens_safe_pos_dac = input; - + //reinitialize when the safe_pos parameter is manually configured. + runtime_inited = false; retval = count; exit: return retval;