"read from offset 0x%x error %d", reg, err);
return err;
}
-
+
*val = 0;
/* high byte comes first */
if (data_length == OV2680_8BIT)
static int ov2680_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
-
*val = (OV2680_F_NUMBER_DEFAULT_NUM << 24) |
(OV2680_F_NUMBER_DEM << 16) |
(OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
-
+
*val = ov2680_res[dev->fmt_idx].bin_factor_y;
dev_dbg(&client->dev, "++++ov2680_g_bin_factor_y\n");
return 0;
struct ov2680_device *dev = to_ov2680_sensor(sd);
u16 vts,hts;
int ret,exp_val;
-
+
dev_dbg(&client->dev, "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",coarse_itg, gain, digitgain);
hts = ov2680_res[dev->fmt_idx].pixels_per_line;
switch (cmd) {
case ATOMISP_IOC_S_EXPOSURE:
return ov2680_s_exposure(sd, arg);
-
+
default:
return -EINVAL;
}
if (on == 0){
ret = power_down(sd);
} else {
- ret = power_up(sd);
+ ret = power_up(sd);
if (!ret)
return ov2680_init(sd);
}
dev_dbg(&client->dev, "ov2680_s_stream one \n");
else
dev_dbg(&client->dev, "ov2680_s_stream off \n");
-
+
ret = ov2680_write_reg(client, OV2680_8BIT, OV2680_SW_STREAM,
enable ? OV2680_START_STREAMING :
OV2680_STOP_STREAMING);
dev_err(&client->dev, "ov2680_detect err s_config.\n");
goto fail_csi_cfg;
}
-
+
/* turn off sensor, after probed */
ret = power_down(sd);
if (ret) {
static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
-
+
mutex_lock(&dev->input_lock);
*frames = ov2680_res[dev->fmt_idx].skip_frames;
mutex_unlock(&dev->input_lock);