mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
media: i2c: it6625: use enable_streams and disable_streams
The .s_stream video op is deprecated; add .enable_streams()/ .disable_streams() pad ops instead and keep v4l2_subdev_s_stream_helper for legacy .s_stream callers. Both ops take it6625_lock explicitly around the MCU transactions. This device has a single, non-multiplexed source pad, so the core's implicit stream 0 is sufficient and V4L2_SUBDEV_FL_STREAMS is not set. Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
e2b71ff73b
commit
38a8c2e8a0
|
|
@ -938,12 +938,6 @@ static int it6625_enable_stream_locked(struct it6625 *it6625, bool enable)
|
|||
return it6625_update_config(it6625);
|
||||
}
|
||||
|
||||
static int it6625_enable_stream(struct it6625 *it6625, bool enable)
|
||||
{
|
||||
guard(mutex)(&it6625->it6625_lock);
|
||||
return it6625_enable_stream_locked(it6625, enable);
|
||||
}
|
||||
|
||||
static int it6625_set_mipi_config_locked(struct it6625 *it6625, u32 cfg_val)
|
||||
{
|
||||
u8 mipi_data_type;
|
||||
|
|
@ -1541,11 +1535,24 @@ static int it6625_dv_timings_cap(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int it6625_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
static int it6625_enable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state,
|
||||
u32 pad, u64 streams_mask)
|
||||
{
|
||||
struct it6625 *it6625 = sd_to_6625(sd);
|
||||
|
||||
return it6625_enable_stream(it6625, enable);
|
||||
guard(mutex)(&it6625->it6625_lock);
|
||||
return it6625_enable_stream_locked(it6625, true);
|
||||
}
|
||||
|
||||
static int it6625_disable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state,
|
||||
u32 pad, u64 streams_mask)
|
||||
{
|
||||
struct it6625 *it6625 = sd_to_6625(sd);
|
||||
|
||||
guard(mutex)(&it6625->it6625_lock);
|
||||
return it6625_enable_stream_locked(it6625, false);
|
||||
}
|
||||
|
||||
static int it6625_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
|
|
@ -1836,7 +1843,7 @@ static const struct v4l2_subdev_core_ops it6625_core_ops = {
|
|||
|
||||
static const struct v4l2_subdev_video_ops it6625_video_ops = {
|
||||
.g_input_status = it6625_g_input_status,
|
||||
.s_stream = it6625_s_stream,
|
||||
.s_stream = v4l2_subdev_s_stream_helper,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_pad_ops it6625_pad_ops = {
|
||||
|
|
@ -1851,6 +1858,8 @@ static const struct v4l2_subdev_pad_ops it6625_pad_ops = {
|
|||
.s_dv_timings = it6625_pad_s_dv_timings,
|
||||
.g_dv_timings = it6625_pad_g_dv_timings,
|
||||
.query_dv_timings = it6625_pad_query_dv_timings,
|
||||
.enable_streams = it6625_enable_streams,
|
||||
.disable_streams = it6625_disable_streams,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops it6625_ops = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user