msm: camera: flash: Add flash off operation in shutdown
There is high chances, when camera server crash flash may not have flash off request scheduled with CRM. In case of torch on, followed by shutdown sequence, if flash off request is not scheduled, flash remains turned on. This change adds flash off operation, in case of shutdown. CRs-Fixed: 2691916 Change-Id: I472f2b204b93d0cdc3d8a1f14fff29ab479e4588 Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This commit is contained in:
@@ -466,8 +466,6 @@ int cam_flash_off(struct cam_flash_ctrl *flash_ctrl)
|
||||
if (flash_ctrl->switch_trigger)
|
||||
cam_res_mgr_led_trigger_event(flash_ctrl->switch_trigger,
|
||||
(enum led_brightness)LED_SWITCH_OFF);
|
||||
|
||||
flash_ctrl->flash_state = CAM_FLASH_STATE_START;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1829,6 +1827,7 @@ void cam_flash_shutdown(struct cam_flash_ctrl *fctrl)
|
||||
if ((fctrl->flash_state == CAM_FLASH_STATE_CONFIG) ||
|
||||
(fctrl->flash_state == CAM_FLASH_STATE_START)) {
|
||||
fctrl->func_tbl.flush_req(fctrl, FLUSH_ALL, 0);
|
||||
cam_flash_off(fctrl);
|
||||
if (fctrl->func_tbl.power_ops) {
|
||||
rc = fctrl->func_tbl.power_ops(fctrl, false);
|
||||
if (rc)
|
||||
|
@@ -176,9 +176,9 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl,
|
||||
goto release_mutex;
|
||||
}
|
||||
|
||||
cam_flash_off(fctrl);
|
||||
fctrl->func_tbl.flush_req(fctrl, FLUSH_ALL, 0);
|
||||
fctrl->last_flush_req = 0;
|
||||
cam_flash_off(fctrl);
|
||||
fctrl->flash_state = CAM_FLASH_STATE_ACQUIRE;
|
||||
break;
|
||||
}
|
||||
|
Verwijs in nieuw issue
Block a user