mirror of
https://github.com/commaai/agnos-kernel-sdm845.git
synced 2026-06-08 11:24:51 +08:00
msm: camera: flash: Remove regulator power up/down from early PCR
Regulator is enabled at the time of flash init. Early PCR tries to enable regulator again which is not correct operation. This change fixes this error by removing regulator in early PCR operation. Change-Id: Ice6cd13ab1724d15950458579ab60aedd15103fa Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This commit is contained in:
committed by
Haizhou Fan
parent
d374014bea
commit
49f68461d7
@@ -701,12 +701,7 @@ int cam_flash_pmic_apply_setting(struct cam_flash_ctrl *fctrl,
|
||||
fctrl->flash_state);
|
||||
return -EINVAL;
|
||||
}
|
||||
rc = cam_flash_prepare(fctrl, true);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_FLASH,
|
||||
"Enable Regulator Failed rc = %d", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = cam_flash_high(fctrl, flash_data);
|
||||
if (rc)
|
||||
CAM_ERR(CAM_FLASH,
|
||||
@@ -721,12 +716,7 @@ int cam_flash_pmic_apply_setting(struct cam_flash_ctrl *fctrl,
|
||||
fctrl->flash_state);
|
||||
return -EINVAL;
|
||||
}
|
||||
rc = cam_flash_prepare(fctrl, true);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_FLASH,
|
||||
"Enable Regulator Failed rc = %d", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = cam_flash_low(fctrl, flash_data);
|
||||
if (rc)
|
||||
CAM_ERR(CAM_FLASH,
|
||||
@@ -741,15 +731,6 @@ int cam_flash_pmic_apply_setting(struct cam_flash_ctrl *fctrl,
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
if ((fctrl->flash_state ==
|
||||
CAM_FLASH_STATE_START) &&
|
||||
(fctrl->is_regulator_enabled == true)) {
|
||||
rc = cam_flash_prepare(fctrl, false);
|
||||
if (rc)
|
||||
CAM_ERR(CAM_FLASH,
|
||||
"Disable Regulator failed: %d",
|
||||
rc);
|
||||
}
|
||||
}
|
||||
} else if (fctrl->nrt_info.cmn_attr.cmd_type ==
|
||||
CAMERA_SENSOR_FLASH_CMD_TYPE_WIDGET) {
|
||||
|
||||
Reference in New Issue
Block a user