Add s_stream interface for MIPI CSI and ov5647/ov5640 drivers.
Enable MIPI CSI sensor after MIPI CSI DPHY CLK enable
in case MIPI DPHY miss MIPI CSI sensor signal.
Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit
26d81b416be6e3af203d1254a3116dbcf39a5605)
goto unlock;
}
mipi_csis_start_stream(state);
+ v4l2_subdev_call(state->sensor_sd, video, s_stream, true);
state->flags |= ST_STREAMING;
} else {
+ v4l2_subdev_call(state->sensor_sd, video, s_stream, false);
mipi_csis_stop_stream(state);
state->flags &= ~ST_STREAMING;
if (debug > 0)
ov5640_write_reg(0x4202, 0x0f);
}
-
static int OV5640_get_sysclk(void)
{
/* calculate sysclk */
}
OV5640_set_shutter(cap_shutter);
- OV5640_stream_on();
-
err:
return retval;
}
if (retval < 0)
goto err;
- OV5640_stream_on();
-
OV5640_turn_on_AE_AG(1);
err:
return ret;
}
+static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
+{
+ if (enable)
+ OV5640_stream_on();
+ else
+ OV5640_stream_off();
+ return 0;
+}
+
static struct v4l2_subdev_video_ops ov5640_subdev_video_ops = {
.g_parm = ov5640_g_parm,
.s_parm = ov5640_s_parm,
+ .s_stream = ov5640_s_stream,
};
static const struct v4l2_subdev_pad_ops ov5640_subdev_pad_ops = {
}
ov5647_set_shutter(cap_shutter);
- ov5647_stream_on();
-
err:
return retval;
}
if (retval < 0)
goto err;
- ov5647_stream_on();
-
ov5647_turn_on_AE_AG(1);
err:
return ret;
}
+static int ov5647_s_stream(struct v4l2_subdev *sd, int enable)
+{
+ if (enable)
+ ov5647_stream_on();
+ else
+ ov5647_stream_off();
+ return 0;
+}
+
static struct v4l2_subdev_video_ops ov5647_subdev_video_ops = {
.g_parm = ov5647_g_parm,
.s_parm = ov5647_s_parm,
+ .s_stream = ov5647_s_stream,
};
static const struct v4l2_subdev_pad_ops ov5647_subdev_pad_ops = {