Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_core.c +26 −7 Original line number Diff line number Diff line Loading @@ -371,12 +371,12 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_FIREHIGH) { if (fctrl->flash_state != CAM_FLASH_STATE_CONFIG) { if (fctrl->flash_state == CAM_FLASH_STATE_START) { CAM_WARN(CAM_FLASH, "Cannot apply Start Dev:Prev state: %d", "Wrong state :Prev state: %d", fctrl->flash_state); return rc; return -EINVAL; } rc = cam_flash_prepare(fctrl, true); if (rc) { Loading @@ -387,8 +387,27 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, rc = cam_flash_high(fctrl, flash_data); if (rc) CAM_ERR(CAM_FLASH, "FLASH ON failed : %d", rc); "FLASH ON failed : %d", rc); } if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_FIRELOW) { if (fctrl->flash_state == CAM_FLASH_STATE_START) { CAM_WARN(CAM_FLASH, "Wrong state :Prev state: %d", 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, "TORCH ON failed : %d", rc); } if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_OFF) { Loading Loading @@ -617,7 +636,7 @@ int cam_flash_parser(struct cam_flash_ctrl *fctrl, void *arg) CAM_FLASH_STATE_CONFIG; break; case CAMERA_SENSOR_FLASH_CMD_TYPE_INIT_FIRE: CAM_DBG(CAM_FLASH, "Widget Flash Operation"); CAM_DBG(CAM_FLASH, "INIT Fire Operation"); flash_operation_info = (struct cam_flash_set_on_off *) cmd_buf; fctrl->nrt_info.cmn_attr.count = Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_dev.c +8 −10 Original line number Diff line number Diff line Loading @@ -149,17 +149,15 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl, goto release_mutex; } if (fctrl->is_regulator_enabled == false) { rc = cam_flash_prepare(fctrl, true); if (rc) { CAM_ERR(CAM_FLASH, "Enable Regulator Failed rc = %d", rc); goto release_mutex; } rc = cam_flash_apply_setting(fctrl, 0); if (rc) { CAM_ERR(CAM_FLASH, "cannot apply settings rc = %d", rc); goto release_mutex; } fctrl->flash_state = CAM_FLASH_STATE_START; break; } Loading Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_core.c +26 −7 Original line number Diff line number Diff line Loading @@ -371,12 +371,12 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_FIREHIGH) { if (fctrl->flash_state != CAM_FLASH_STATE_CONFIG) { if (fctrl->flash_state == CAM_FLASH_STATE_START) { CAM_WARN(CAM_FLASH, "Cannot apply Start Dev:Prev state: %d", "Wrong state :Prev state: %d", fctrl->flash_state); return rc; return -EINVAL; } rc = cam_flash_prepare(fctrl, true); if (rc) { Loading @@ -387,8 +387,27 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, rc = cam_flash_high(fctrl, flash_data); if (rc) CAM_ERR(CAM_FLASH, "FLASH ON failed : %d", rc); "FLASH ON failed : %d", rc); } if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_FIRELOW) { if (fctrl->flash_state == CAM_FLASH_STATE_START) { CAM_WARN(CAM_FLASH, "Wrong state :Prev state: %d", 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, "TORCH ON failed : %d", rc); } if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_OFF) { Loading Loading @@ -617,7 +636,7 @@ int cam_flash_parser(struct cam_flash_ctrl *fctrl, void *arg) CAM_FLASH_STATE_CONFIG; break; case CAMERA_SENSOR_FLASH_CMD_TYPE_INIT_FIRE: CAM_DBG(CAM_FLASH, "Widget Flash Operation"); CAM_DBG(CAM_FLASH, "INIT Fire Operation"); flash_operation_info = (struct cam_flash_set_on_off *) cmd_buf; fctrl->nrt_info.cmn_attr.count = Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_dev.c +8 −10 Original line number Diff line number Diff line Loading @@ -149,17 +149,15 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl, goto release_mutex; } if (fctrl->is_regulator_enabled == false) { rc = cam_flash_prepare(fctrl, true); if (rc) { CAM_ERR(CAM_FLASH, "Enable Regulator Failed rc = %d", rc); goto release_mutex; } rc = cam_flash_apply_setting(fctrl, 0); if (rc) { CAM_ERR(CAM_FLASH, "cannot apply settings rc = %d", rc); goto release_mutex; } fctrl->flash_state = CAM_FLASH_STATE_START; break; } Loading