diff --git a/drivers/cam_sensor_module/cam_ois/cam_ois_core.c b/drivers/cam_sensor_module/cam_ois/cam_ois_core.c index 318b8d692030..2ef322c18f2c 100644 --- a/drivers/cam_sensor_module/cam_ois/cam_ois_core.c +++ b/drivers/cam_sensor_module/cam_ois/cam_ois_core.c @@ -96,7 +96,7 @@ static int cam_ois_get_dev_handle(struct cam_ois_ctrl_t *o_ctrl, o_ctrl->bridge_intf.device_hdl = ois_acq_dev.device_handle; o_ctrl->bridge_intf.session_hdl = ois_acq_dev.session_handle; - CAM_DBG(CAM_OIS, "Device Handle: %d", ois_acq_dev.device_handle); + CAM_INFO(CAM_OIS, "Device Handle: %d", ois_acq_dev.device_handle); if (copy_to_user(u64_to_user_ptr(cmd->handle), &ois_acq_dev, sizeof(struct cam_sensor_acquire_dev))) { CAM_ERR(CAM_OIS, "ACQUIRE_DEV: copy to user failed"); @@ -249,7 +249,7 @@ static int cam_ois_update_time(struct i2c_settings_array *i2c_set) return -EINVAL; } for (i = 0; i < size; i++) { - CAM_DBG(CAM_OIS, "time: reg_data[%d]: 0x%x", + CAM_INFO(CAM_OIS, "time: reg_data[%d]: 0x%x", i, (qtime_ns & 0xFF)); i2c_list->i2c_settings.reg_setting[i].reg_data = (qtime_ns & 0xFF); @@ -361,11 +361,11 @@ static int cam_ois_slaveInfo_pkt_parser(struct cam_ois_ctrl_t *o_ctrl, o_ctrl->io_master_info.cci_client->id_map = 0; memcpy(&(o_ctrl->opcode), &(ois_info->opcode), sizeof(struct cam_ois_opcode)); - CAM_DBG(CAM_OIS, "Slave addr: 0x%x Freq Mode: %d", + CAM_INFO(CAM_OIS, "Slave addr: 0x%x Freq Mode: %d", ois_info->slave_addr, ois_info->i2c_freq_mode); } else if (o_ctrl->io_master_info.master_type == I2C_MASTER) { o_ctrl->io_master_info.client->addr = ois_info->slave_addr; - CAM_DBG(CAM_OIS, "Slave addr: 0x%x", ois_info->slave_addr); + CAM_INFO(CAM_OIS, "Slave addr: 0x%x", ois_info->slave_addr); } else { CAM_ERR(CAM_OIS, "Invalid Master type : %d", o_ctrl->io_master_info.master_type); @@ -431,7 +431,7 @@ static int cam_ois_fw_prog_download(struct cam_ois_ctrl_t *o_ctrl) return -ENOMEM; } - CAM_DBG(CAM_OIS, "fw len: %d, addr_type: %d, data_type: %d, chunck: %d, ois_fw_data_type:%d", total_bytes, + CAM_INFO(CAM_OIS, "fw len: %d, addr_type: %d, data_type: %d, chunck: %d, ois_fw_data_type:%d", total_bytes, i2c_reg_setting.addr_type, i2c_reg_setting.data_type, txn_data_size, @@ -457,7 +457,7 @@ static int cam_ois_fw_prog_download(struct cam_ois_ctrl_t *o_ctrl) } i2c_reg_setting.reg_setting[packet_idx].delay = 0; i2c_reg_setting.reg_setting[packet_idx].data_mask = 0; - CAM_DBG(CAM_OIS, "OIS_FW Reg:[0x%04x]: 0x%04x P:0x%x", + CAM_INFO(CAM_OIS, "OIS_FW Reg:[0x%04x]: 0x%04x P:0x%x", i2c_reg_setting.reg_setting[packet_idx].reg_addr, i2c_reg_setting.reg_setting[packet_idx].reg_data, (ptr-(uint8_t *)fw->data)); @@ -475,7 +475,7 @@ static int cam_ois_fw_prog_download(struct cam_ois_ctrl_t *o_ctrl) goto release_firmware; } total_idx += packet_idx*o_ctrl->ois_fw_data_type; - CAM_DBG(CAM_OIS, "packet_idx: %d, total_idx: %d", packet_idx, total_idx); + CAM_INFO(CAM_OIS, "packet_idx: %d, total_idx: %d", packet_idx, total_idx); } if (strstr(o_ctrl->ois_name, "dw9781")) { @@ -510,7 +510,7 @@ static int cam_ois_fw_coeff_download(struct cam_ois_ctrl_t *o_ctrl) } if (strstr(o_ctrl->ois_name, "dw9781")) { - CAM_DBG(CAM_OIS, "not need download coeff fw!"); + CAM_INFO(CAM_OIS, "not need download coeff fw!"); return 0; } @@ -607,7 +607,7 @@ static int cam_ois_write_q_timer(struct cam_ois_ctrl_t *o_ctrl) o_ctrl->mono_timestamp = mono_time_ns; } - CAM_DBG(CAM_OIS,"Write Q-timer %d, mono timestamp %lld", data, mono_time_ns); + CAM_INFO(CAM_OIS,"Write Q-timer %d, mono timestamp %lld", data, mono_time_ns); return rc; } @@ -721,7 +721,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) break; case CAMERA_SENSOR_CMD_TYPE_PWR_UP: case CAMERA_SENSOR_CMD_TYPE_PWR_DOWN: - CAM_DBG(CAM_OIS, + CAM_INFO(CAM_OIS, "Received power settings buffer"); rc = cam_sensor_update_power_settings( cmd_buf, @@ -735,7 +735,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) break; default: if (o_ctrl->i2c_init_data.is_settings_valid == 0) { - CAM_DBG(CAM_OIS, + CAM_INFO(CAM_OIS, "Received init settings"); i2c_reg_settings = &(o_ctrl->i2c_init_data); @@ -752,7 +752,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) } } else if (((o_ctrl->ois_preprog_flag) != 0) && o_ctrl->i2c_preprog_data.is_settings_valid == 0) { - CAM_DBG(CAM_OIS, "Received PreProg Settings"); + CAM_INFO(CAM_OIS, "Received PreProg Settings"); i2c_reg_settings = &(o_ctrl->i2c_preprog_data); i2c_reg_settings->request_id = 0; rc = cam_sensor_i2c_command_parser( @@ -766,7 +766,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) } } else if (((o_ctrl->ois_precoeff_flag) != 0) && o_ctrl->i2c_precoeff_data.is_settings_valid == 0) { - CAM_DBG(CAM_OIS, "Received PreCoeff Settings"); + CAM_INFO(CAM_OIS, "Received PreCoeff Settings"); i2c_reg_settings = &(o_ctrl->i2c_precoeff_data); i2c_reg_settings->request_id = 0; rc = cam_sensor_i2c_command_parser( @@ -781,7 +781,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) } else if ((o_ctrl->is_ois_calib != 0) && (o_ctrl->i2c_calib_data.is_settings_valid == 0)) { - CAM_DBG(CAM_OIS, + CAM_INFO(CAM_OIS, "Received calib settings"); i2c_reg_settings = &(o_ctrl->i2c_calib_data); i2c_reg_settings->is_settings_valid = 1; @@ -797,7 +797,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) } } else if (((o_ctrl->ois_postcalib_flag) != 0) && o_ctrl->i2c_postcalib_data.is_settings_valid == 0) { - CAM_DBG(CAM_OIS, "Received PostCalib Settings"); + CAM_INFO(CAM_OIS, "Received PostCalib Settings"); i2c_reg_settings = &(o_ctrl->i2c_postcalib_data); i2c_reg_settings->request_id = 0; rc = cam_sensor_i2c_command_parser( @@ -883,7 +883,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) } if (o_ctrl->ois_postcalib_flag) { - CAM_DBG(CAM_OIS, "starting post calib data"); + CAM_INFO(CAM_OIS, "starting post calib data"); rc = cam_ois_apply_settings(o_ctrl, &o_ctrl->i2c_postcalib_data); if (rc) { @@ -969,7 +969,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) o_ctrl->cam_ois_state); return rc; } - CAM_DBG(CAM_OIS, "number of I/O configs: %d:", + CAM_INFO(CAM_OIS, "number of I/O configs: %d:", csl_packet->num_io_configs); if (csl_packet->num_io_configs == 0) { CAM_ERR(CAM_OIS, "No I/O configs to process"); @@ -1091,7 +1091,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) o_ctrl->cam_ois_state); return rc; } - CAM_DBG(CAM_OIS, "number of I/O configs: %d:", + CAM_INFO(CAM_OIS, "number of I/O configs: %d:", csl_packet->num_io_configs); if (csl_packet->num_io_configs < 2) { CAM_ERR(CAM_OIS, "Not enough I/O Configs"); @@ -1190,7 +1190,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) o_ctrl->cam_ois_state); return rc; } - CAM_DBG(CAM_OIS, "number of I/O configs: %d:", + CAM_INFO(CAM_OIS, "number of I/O configs: %d:", csl_packet->num_io_configs); if (csl_packet->num_io_configs < 2) { CAM_ERR(CAM_OIS, "Not enough I/O Configs"); @@ -1253,7 +1253,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) buff_length = i2c_list->i2c_settings.read_buff_len; read_length = i2c_list->i2c_settings.size; - CAM_DBG(CAM_OIS, "buff_length = %d, read_length = %d", buff_length, read_length); + CAM_INFO(CAM_OIS, "buff_length = %d, read_length = %d", buff_length, read_length); if (read_length > buff_length || buff_length < PACKET_BYTE*MAX_PACKET) { CAM_ERR(CAM_SENSOR, @@ -1340,7 +1340,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) o_ctrl->cam_ois_state); return rc; } - CAM_DBG(CAM_OIS, "number of I/O configs: %d:", + CAM_INFO(CAM_OIS, "number of I/O configs: %d:", csl_packet->num_io_configs); if (csl_packet->num_io_configs < 2) { CAM_ERR(CAM_OIS, "Not enough I/O Configs"); @@ -1401,7 +1401,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) buff_length = i2c_list->i2c_settings.read_buff_len; read_length = i2c_list->i2c_settings.size; - CAM_DBG(CAM_OIS, "buff_length = %d, read_length = %d", buff_length, read_length); + CAM_INFO(CAM_OIS, "buff_length = %d, read_length = %d", buff_length, read_length); if (buff_length < read_length) { CAM_ERR(CAM_SENSOR, "Invalid buffer size, readLen: %d, bufLen: %d", read_length, buff_length); @@ -1447,7 +1447,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) sample_cnt = ((read_buff[0] & 0xF) << 8) | read_buff[1]; latest_data_ts = (read_buff[2] << 8) | read_buff[3]; - CAM_DBG(CAM_OIS, "flag = %d, sample_cnt = %d, latest_data_ts = %d", + CAM_INFO(CAM_OIS, "flag = %d, sample_cnt = %d, latest_data_ts = %d", flag, sample_cnt, latest_data_ts); if (flag != 0x2 && flag != 0x3) { @@ -1480,7 +1480,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg) return -EINVAL; } - CAM_DBG(CAM_OIS,"latest ois data mono timestamp %lld", o_ctrl->mono_timestamp); + CAM_INFO(CAM_OIS,"latest ois data mono timestamp %lld", o_ctrl->mono_timestamp); memcpy((void *)timestampBuf, (void *)&o_ctrl->mono_timestamp, sizeof(uint64_t)); } @@ -1592,7 +1592,7 @@ int cam_ois_driver_cmd(struct cam_ois_ctrl_t *o_ctrl, void *arg) rc = -EFAULT; goto release_mutex; } - CAM_DBG(CAM_OIS, "ois_cap: ID: %d", ois_cap.slot_info); + CAM_INFO(CAM_OIS, "ois_cap: ID: %d", ois_cap.slot_info); break; case CAM_ACQUIRE_DEV: rc = cam_ois_get_dev_handle(o_ctrl, arg); diff --git a/drivers/cam_sensor_module/cam_ois/cam_ois_dev.c b/drivers/cam_sensor_module/cam_ois/cam_ois_dev.c index 95414b9a0976..a506168cfb2e 100644 --- a/drivers/cam_sensor_module/cam_ois/cam_ois_dev.c +++ b/drivers/cam_sensor_module/cam_ois/cam_ois_dev.c @@ -28,7 +28,7 @@ static int cam_ois_clear_data_ready(struct cam_ois_ctrl_t *o_ctrl) CAM_ERR(CAM_OIS, "Failed in Applying i2c wrt settings"); } - CAM_DBG(CAM_OIS,"Clear data-ready success"); + CAM_INFO(CAM_OIS,"Clear data-ready success"); return rc; } @@ -56,7 +56,7 @@ static int cam_ois_subdev_close(struct v4l2_subdev *sd, bool crm_active = cam_req_mgr_is_open(CAM_OIS); if (crm_active) { - CAM_DBG(CAM_OIS, "CRM is ACTIVE, close should be from CRM"); + CAM_INFO(CAM_OIS, "CRM is ACTIVE, close should be from CRM"); return 0; } @@ -340,17 +340,17 @@ static irqreturn_t cam_ois_vsync_irq_thread(int irq, void *data) goto release_mutex; } - CAM_DBG(CAM_OIS, "mode_val = 0x%02x, enable_val = 0x%02x", mode_val, enable_val); + CAM_INFO(CAM_OIS, "mode_val = 0x%02x, enable_val = 0x%02x", mode_val, enable_val); if (mode_val != 0 || enable_val != 0) { - CAM_DBG(CAM_OIS, "ois is not in move mode, skip this irq"); + CAM_INFO(CAM_OIS, "ois is not in move mode, skip this irq"); goto release_mutex; } ktime_get_boottime_ts64(&ts); mono_time_ns = (uint64_t)((ts.tv_sec * 1000000000) + ts.tv_nsec); - CAM_DBG(CAM_OIS, "vsync sof mono timestamp is %lld", mono_time_ns); + CAM_INFO(CAM_OIS, "vsync sof mono timestamp is %lld", mono_time_ns); o_ctrl->prev_timestamp = o_ctrl->curr_timestamp; o_ctrl->curr_timestamp = mono_time_ns; @@ -399,7 +399,7 @@ static irqreturn_t cam_ois_vsync_irq_thread(int irq, void *data) sample_cnt = read_buff[1]; if (sample_cnt != 0) { packet_cnt = (sample_cnt + 9)/10; - CAM_DBG(CAM_OIS,"sample data = 0x%x, packet_cnt = %d", sample_cnt, packet_cnt); + CAM_INFO(CAM_OIS,"sample data = 0x%x, packet_cnt = %d", sample_cnt, packet_cnt); // we only need max 30 sample. if (packet_cnt > MAX_PACKET || sample_cnt > MAX_SAMPLE) { @@ -515,7 +515,7 @@ static int cam_ois_component_bind(struct device *dev, o_ctrl->vsync_irq = platform_get_irq_optional(pdev, 0); if (o_ctrl->vsync_irq > 0) { - CAM_DBG(CAM_OIS, "get ois-vsync irq: %d", o_ctrl->vsync_irq); + CAM_INFO(CAM_OIS, "get ois-vsync irq: %d", o_ctrl->vsync_irq); rc = devm_request_threaded_irq(dev, o_ctrl->vsync_irq, @@ -527,12 +527,12 @@ static int cam_ois_component_bind(struct device *dev, if (rc != 0) CAM_ERR(CAM_OIS, "failed: to request ois-vsync IRQ %d, rc %d", o_ctrl->vsync_irq, rc); else - CAM_DBG(CAM_OIS, "request ois-vsync IRQ success"); + CAM_INFO(CAM_OIS, "request ois-vsync IRQ success"); } else CAM_ERR(CAM_OIS, "failed: to get ois-vsync IRQ"); } - CAM_DBG(CAM_OIS, "Component bound successfully"); + CAM_INFO(CAM_OIS, "Component bound successfully"); return rc; unreg_subdev: cam_unregister_subdev(&(o_ctrl->v4l2_dev_str)); @@ -595,7 +595,7 @@ static int32_t cam_ois_platform_driver_probe( { int rc = 0; - CAM_DBG(CAM_OIS, "Adding OIS Sensor component"); + CAM_INFO(CAM_OIS, "Adding OIS Sensor component"); rc = component_add(&pdev->dev, &cam_ois_component_ops); if (rc) CAM_ERR(CAM_OIS, "failed to add component rc: %d", rc); diff --git a/drivers/cam_sensor_module/cam_ois/cam_ois_soc.c b/drivers/cam_sensor_module/cam_ois/cam_ois_soc.c index f8f1eefe5f0b..8e77f3e7ea6a 100644 --- a/drivers/cam_sensor_module/cam_ois/cam_ois_soc.c +++ b/drivers/cam_sensor_module/cam_ois/cam_ois_soc.c @@ -45,7 +45,7 @@ static int cam_ois_get_dt_data(struct cam_ois_ctrl_t *o_ctrl) o_ctrl->is_ois_vsync_irq_supported = false; CAM_WARN(CAM_OIS, "disable ois vsync irq in factory build"); #endif - CAM_DBG(CAM_OIS, "is_ois_vsync_irq_supported %d", o_ctrl->is_ois_vsync_irq_supported); + CAM_INFO(CAM_OIS, "is_ois_vsync_irq_supported %d", o_ctrl->is_ois_vsync_irq_supported); rc = cam_soc_util_get_dt_properties(soc_info); if (rc < 0) { @@ -116,7 +116,7 @@ int cam_ois_driver_soc_init(struct cam_ois_ctrl_t *o_ctrl) rc = of_property_read_u32(of_node, "cci-master", &o_ctrl->cci_i2c_master); if (rc < 0) { - CAM_DBG(CAM_OIS, "failed rc %d", rc); + CAM_INFO(CAM_OIS, "failed rc %d", rc); return rc; } @@ -127,13 +127,13 @@ int cam_ois_driver_soc_init(struct cam_ois_ctrl_t *o_ctrl) o_ctrl->cci_num = CCI_DEVICE_0; o_ctrl->io_master_info.cci_client->cci_device = o_ctrl->cci_num; - CAM_DBG(CAM_OIS, "cci-device %d", o_ctrl->cci_num, rc); + CAM_INFO(CAM_OIS, "cci-device %d", o_ctrl->cci_num, rc); } rc = cam_ois_get_dt_data(o_ctrl); if (rc < 0) - CAM_DBG(CAM_OIS, "failed: ois get dt data rc %d", rc); + CAM_INFO(CAM_OIS, "failed: ois get dt data rc %d", rc); return rc; }