Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions drivers/media/i2c/ov5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -3946,6 +3946,9 @@ static int ov5640_probe(struct i2c_client *client)
if (ret)
goto free_ctrls;

pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);

return 0;

free_ctrls:
Expand All @@ -3968,20 +3971,20 @@ static void ov5640_remove(struct i2c_client *client)
}

static const struct i2c_device_id ov5640_id[] = {
{"ov5640", 0},
{"ov5640_mipi", 0},
{},
};
MODULE_DEVICE_TABLE(i2c, ov5640_id);

static const struct of_device_id ov5640_dt_ids[] = {
{ .compatible = "ovti,ov5640" },
{ .compatible = "ovti,ov5640_mipi" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, ov5640_dt_ids);

static struct i2c_driver ov5640_i2c_driver = {
.driver = {
.name = "ov5640",
.name = "ov5640_mipi",
.of_match_table = ov5640_dt_ids,
},
.id_table = ov5640_id,
Expand Down
15 changes: 11 additions & 4 deletions drivers/media/platform/mxc/capture/ov5640_mipi_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,13 +1012,14 @@ static int ov5640_download_firmware(struct ov5640 *sensor,
register u8 Val = 0;
u8 RegVal = 0;
int i, retval = 0;

pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
for (i = 0; i < ArySize; ++i, ++pModeSetting) {
Delay_ms = pModeSetting->u32Delay_ms;
RegAddr = pModeSetting->u16RegAddr;
Val = pModeSetting->u8Val;
Mask = pModeSetting->u8Mask;

pr_emerg("RegAddr:0x%08x u8Val:0x%08x u8Mask:0x%08x \n",RegAddr,Val,Mask);
if (Mask) {
retval = ov5640_read_reg(sensor, RegAddr, &RegVal);
if (retval < 0)
Expand Down Expand Up @@ -1056,7 +1057,7 @@ static int ov5640_change_mode_exposure_calc(struct ov5640 *sensor,
int light_freq, cap_bandfilt, cap_maxband;
long cap_gain16_shutter;
int retval = 0;

pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
/* check if the input mode and frame rate is valid */
pModeSetting =
ov5640_mode_info_data[frame_rate][mode].init_data_ptr;
Expand Down Expand Up @@ -1180,7 +1181,7 @@ static int ov5640_change_mode_direct(struct ov5640 *sensor,
struct reg_value *pModeSetting = NULL;
s32 ArySize = 0;
int retval = 0;

pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
/* check if the input mode and frame rate is valid */
pModeSetting =
ov5640_mode_info_data[frame_rate][mode].init_data_ptr;
Expand All @@ -1201,6 +1202,7 @@ static int ov5640_change_mode_direct(struct ov5640 *sensor,

OV5640_stream_off(sensor);

pr_emerg("zeiss:func %s :frame_rate:%d mode:%d \n",__func__,frame_rate,mode);
/* Write capture setting */
retval = ov5640_download_firmware(sensor, pModeSetting, ArySize);
if (retval < 0)
Expand Down Expand Up @@ -1242,13 +1244,15 @@ static int ov5640_init_mode(struct ov5640 *sensor,

sensor->pix.width = 640;
sensor->pix.height = 480;
pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
retval = ov5640_download_firmware(sensor, pModeSetting,
ArySize);
if (retval < 0)
goto err;

pModeSetting = ov5640_setting_30fps_VGA_640_480;
ArySize = ARRAY_SIZE(ov5640_setting_30fps_VGA_640_480);
pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
retval = ov5640_download_firmware(sensor, pModeSetting,
ArySize);
} else if ((dn_mode == SUBSAMPLING && orig_dn_mode == SCALING) ||
Expand Down Expand Up @@ -1410,6 +1414,8 @@ static int ov5640_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a)
return -EINVAL;
}

pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);

orig_mode = sensor->streamcap.capturemode;
ret = ov5640_init_mode(sensor, frame_rate,
(u32)a->parm.capture.capturemode, orig_mode);
Expand Down Expand Up @@ -1827,7 +1833,8 @@ static int ov5640_probe(struct i2c_client *client,
retval);

OV5640_stream_off(sensor);
dev_info(dev, "Camera is found\n");
dev_info(dev, "Zeiss Camera is found\n");
pr_emerg("zeiss:In File %s in func %s ln:%d \n",__FILE__, __func__,__LINE__);
return retval;
}

Expand Down