Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbdfc435 authored by Jigarkumar Zala's avatar Jigarkumar Zala
Browse files

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: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent eec33478
Loading
Loading
Loading
Loading
+2 −21
Original line number Diff line number Diff line
@@ -729,12 +729,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,
@@ -749,12 +744,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,
@@ -769,15 +759,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) {