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

Commit db2b4e62 authored by Jigarkumar Zala's avatar Jigarkumar Zala Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: flash: Remove regulator enable/disable from widget flash



Widget flash config is initiate after start dev, which is enabling
regulator. Removing Regulator enable allow torch to turn on/off under
widget flash usecase.

Change-Id: If3ab871f3b39e24ccfa3d69513a49268627ce6d2
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent e9012ff7
Loading
Loading
Loading
Loading
+10 −28
Original line number Diff line number Diff line
@@ -307,15 +307,6 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl,
			flash_data = &fctrl->nrt_info;
			if (flash_data->opcode ==
				CAMERA_SENSOR_FLASH_OP_FIRELOW) {
				if (!(fctrl->is_regulator_enabled)) {
					rc = cam_flash_prepare(fctrl,
						CAM_FLASH_STATE_START);
					if (rc) {
						CAM_ERR(CAM_FLASH,
							"Reg Enable Failed %d",
							rc);
						goto nrt_del_req;
					}
				rc = cam_flash_low(fctrl, flash_data);
				if (rc) {
					CAM_ERR(CAM_FLASH,
@@ -325,7 +316,6 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl,
				}
				fctrl->flash_state =
						CAM_FLASH_STATE_LOW;
				}
			} else if (flash_data->opcode ==
				CAMERA_SENSOR_FLASH_OP_OFF) {
				if (fctrl->flash_state ==
@@ -336,14 +326,6 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl,
						"LED off failed: %d",
						rc);
				}
				cam_flash_flush_nrt(fctrl);

				rc = cam_flash_release_dev(fctrl);
				if (rc)
					CAM_ERR(CAM_FLASH,
						"Release dev failed rc %d", rc);
				fctrl->flash_state =
					CAM_FLASH_STATE_INIT;
			}
		} else if (fctrl->nrt_info.cmn_attr.cmd_type ==
			CAMERA_SENSOR_FLASH_CMD_TYPE_RER) {