Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_core.c +61 −0 Original line number Diff line number Diff line Loading @@ -580,6 +580,9 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, } break; case CAM_STOP_DEV: { struct i2c_settings_array *i2c_set = NULL; int i; rc = camera_io_release(&a_ctrl->io_master_info); if (rc < 0) CAM_ERR(CAM_ACTUATOR, "Failed in releasing CCI"); Loading @@ -588,6 +591,17 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, CAM_ERR(CAM_ACTUATOR, "Actuator Power down failed"); goto release_mutex; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(a_ctrl->i2c_data.per_frame[i]); if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_SENSOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); } } } break; case CAM_CONFIG_DEV: { Loading Loading @@ -628,3 +642,50 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, return rc; } int32_t cam_actuator_flush_request(struct cam_req_mgr_flush_request *flush_req) { int32_t rc = 0, i; uint32_t cancel_req_id_found = 0; struct cam_actuator_ctrl_t *a_ctrl = NULL; struct i2c_settings_array *i2c_set = NULL; if (!flush_req) return -EINVAL; a_ctrl = (struct cam_actuator_ctrl_t *) cam_get_device_priv(flush_req->dev_hdl); if (!a_ctrl) { CAM_ERR(CAM_ACTUATOR, "Device data is NULL"); return -EINVAL; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(a_ctrl->i2c_data.per_frame[i]); if ((flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ) && (i2c_set->request_id != flush_req->req_id)) continue; if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_ACTUATOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); if (flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ) { cancel_req_id_found = 1; break; } } } if (flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ && !cancel_req_id_found) CAM_DBG(CAM_ACTUATOR, "Flush request id:%lld not found in the pending list", flush_req->req_id); return rc; } drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_core.h +8 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,14 @@ int32_t cam_actuator_apply_request(struct cam_req_mgr_apply_request *apply); */ int32_t cam_actuator_publish_dev_info(struct cam_req_mgr_device_info *info); /** * @flush: Req mgr structure for flushing request * * This API flushes the request that is mentioned */ int cam_actuator_flush_request(struct cam_req_mgr_flush_request *flush); /** * @link: Link setup info * Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_dev.c +2 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,8 @@ static int32_t cam_actuator_driver_platform_probe( cam_actuator_establish_link; a_ctrl->bridge_intf.ops.apply_req = cam_actuator_apply_request; a_ctrl->bridge_intf.ops.flush_req = cam_actuator_flush_request; platform_set_drvdata(pdev, a_ctrl); v4l2_set_subdevdata(&a_ctrl->v4l2_dev_str.sd, a_ctrl); Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor/cam_sensor_core.c +16 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,9 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, } break; case CAM_STOP_DEV: { struct i2c_settings_array *i2c_set = NULL; int i; if (s_ctrl->i2c_data.streamoff_settings.is_settings_valid && (s_ctrl->i2c_data.streamoff_settings.request_id == 0)) { rc = cam_sensor_apply_settings(s_ctrl, 0, Loading @@ -670,6 +673,19 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, CAM_ERR(CAM_SENSOR, "Sensor Power Down failed"); goto release_mutex; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(s_ctrl->i2c_data.per_frame[i]); if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_SENSOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); } } } break; case CAM_CONFIG_DEV: { Loading Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_core.c +61 −0 Original line number Diff line number Diff line Loading @@ -580,6 +580,9 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, } break; case CAM_STOP_DEV: { struct i2c_settings_array *i2c_set = NULL; int i; rc = camera_io_release(&a_ctrl->io_master_info); if (rc < 0) CAM_ERR(CAM_ACTUATOR, "Failed in releasing CCI"); Loading @@ -588,6 +591,17 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, CAM_ERR(CAM_ACTUATOR, "Actuator Power down failed"); goto release_mutex; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(a_ctrl->i2c_data.per_frame[i]); if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_SENSOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); } } } break; case CAM_CONFIG_DEV: { Loading Loading @@ -628,3 +642,50 @@ int32_t cam_actuator_driver_cmd(struct cam_actuator_ctrl_t *a_ctrl, return rc; } int32_t cam_actuator_flush_request(struct cam_req_mgr_flush_request *flush_req) { int32_t rc = 0, i; uint32_t cancel_req_id_found = 0; struct cam_actuator_ctrl_t *a_ctrl = NULL; struct i2c_settings_array *i2c_set = NULL; if (!flush_req) return -EINVAL; a_ctrl = (struct cam_actuator_ctrl_t *) cam_get_device_priv(flush_req->dev_hdl); if (!a_ctrl) { CAM_ERR(CAM_ACTUATOR, "Device data is NULL"); return -EINVAL; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(a_ctrl->i2c_data.per_frame[i]); if ((flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ) && (i2c_set->request_id != flush_req->req_id)) continue; if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_ACTUATOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); if (flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ) { cancel_req_id_found = 1; break; } } } if (flush_req->type == CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ && !cancel_req_id_found) CAM_DBG(CAM_ACTUATOR, "Flush request id:%lld not found in the pending list", flush_req->req_id); return rc; }
drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_core.h +8 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,14 @@ int32_t cam_actuator_apply_request(struct cam_req_mgr_apply_request *apply); */ int32_t cam_actuator_publish_dev_info(struct cam_req_mgr_device_info *info); /** * @flush: Req mgr structure for flushing request * * This API flushes the request that is mentioned */ int cam_actuator_flush_request(struct cam_req_mgr_flush_request *flush); /** * @link: Link setup info * Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_actuator/cam_actuator_dev.c +2 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,8 @@ static int32_t cam_actuator_driver_platform_probe( cam_actuator_establish_link; a_ctrl->bridge_intf.ops.apply_req = cam_actuator_apply_request; a_ctrl->bridge_intf.ops.flush_req = cam_actuator_flush_request; platform_set_drvdata(pdev, a_ctrl); v4l2_set_subdevdata(&a_ctrl->v4l2_dev_str.sd, a_ctrl); Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor/cam_sensor_core.c +16 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,9 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, } break; case CAM_STOP_DEV: { struct i2c_settings_array *i2c_set = NULL; int i; if (s_ctrl->i2c_data.streamoff_settings.is_settings_valid && (s_ctrl->i2c_data.streamoff_settings.request_id == 0)) { rc = cam_sensor_apply_settings(s_ctrl, 0, Loading @@ -670,6 +673,19 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, CAM_ERR(CAM_SENSOR, "Sensor Power Down failed"); goto release_mutex; } for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) { i2c_set = &(s_ctrl->i2c_data.per_frame[i]); if (i2c_set->is_settings_valid == 1) { rc = delete_request(i2c_set); if (rc < 0) CAM_ERR(CAM_SENSOR, "delete request: %lld rc: %d", i2c_set->request_id, rc); } } } break; case CAM_CONFIG_DEV: { Loading