media: i2c: Use the new get_mbus_config pad op
Move the existing users of the g_mbus_config video operation to use the newly introduced get_mbus_config pad operations. All the ported drivers report a static media bus configuration and do no support s_mbus_config so the operation implementation has not changed. Bridge drivers needs to call the new pad operation and will receive an -ENOICTLCMD when calling the old g_mbus_config video operation Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Родитель
38df0b8506
Коммит
0c3da525b4
|
@ -760,8 +760,9 @@ static int adv7180_init_cfg(struct v4l2_subdev *sd,
|
|||
return adv7180_set_pad_format(sd, cfg, &fmt);
|
||||
}
|
||||
|
||||
static int adv7180_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int adv7180_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct adv7180_state *state = to_state(sd);
|
||||
|
||||
|
@ -852,7 +853,6 @@ static const struct v4l2_subdev_video_ops adv7180_video_ops = {
|
|||
.querystd = adv7180_querystd,
|
||||
.g_input_status = adv7180_g_input_status,
|
||||
.s_routing = adv7180_s_routing,
|
||||
.g_mbus_config = adv7180_g_mbus_config,
|
||||
.g_pixelaspect = adv7180_g_pixelaspect,
|
||||
.g_tvnorms = adv7180_g_tvnorms,
|
||||
.s_stream = adv7180_s_stream,
|
||||
|
@ -869,6 +869,7 @@ static const struct v4l2_subdev_pad_ops adv7180_pad_ops = {
|
|||
.enum_mbus_code = adv7180_enum_mbus_code,
|
||||
.set_fmt = adv7180_set_pad_format,
|
||||
.get_fmt = adv7180_get_pad_format,
|
||||
.get_mbus_config = adv7180_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_sensor_ops adv7180_sensor_ops = {
|
||||
|
|
|
@ -219,8 +219,9 @@ static int ml86v7667_fill_fmt(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ml86v7667_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int ml86v7667_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING |
|
||||
V4L2_MBUS_DATA_ACTIVE_HIGH;
|
||||
|
@ -291,13 +292,13 @@ static const struct v4l2_subdev_video_ops ml86v7667_subdev_video_ops = {
|
|||
.s_std = ml86v7667_s_std,
|
||||
.querystd = ml86v7667_querystd,
|
||||
.g_input_status = ml86v7667_g_input_status,
|
||||
.g_mbus_config = ml86v7667_g_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_pad_ops ml86v7667_subdev_pad_ops = {
|
||||
.enum_mbus_code = ml86v7667_enum_mbus_code,
|
||||
.get_fmt = ml86v7667_fill_fmt,
|
||||
.set_fmt = ml86v7667_fill_fmt,
|
||||
.get_mbus_config = ml86v7667_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_core_ops ml86v7667_subdev_core_ops = {
|
||||
|
|
|
@ -689,8 +689,9 @@ static int mt9m001_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mt9m001_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int mt9m001_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
/* MT9M001 has all capture_format parameters fixed */
|
||||
cfg->flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
|
||||
|
@ -703,7 +704,6 @@ static int mt9m001_g_mbus_config(struct v4l2_subdev *sd,
|
|||
|
||||
static const struct v4l2_subdev_video_ops mt9m001_subdev_video_ops = {
|
||||
.s_stream = mt9m001_s_stream,
|
||||
.g_mbus_config = mt9m001_g_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_sensor_ops mt9m001_subdev_sensor_ops = {
|
||||
|
@ -717,6 +717,7 @@ static const struct v4l2_subdev_pad_ops mt9m001_subdev_pad_ops = {
|
|||
.set_selection = mt9m001_set_selection,
|
||||
.get_fmt = mt9m001_get_fmt,
|
||||
.set_fmt = mt9m001_set_fmt,
|
||||
.get_mbus_config = mt9m001_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops mt9m001_subdev_ops = {
|
||||
|
|
|
@ -1137,8 +1137,9 @@ static int mt9m111_init_cfg(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int mt9m111_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);
|
||||
|
||||
|
@ -1155,7 +1156,6 @@ static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
|
|||
}
|
||||
|
||||
static const struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = {
|
||||
.g_mbus_config = mt9m111_g_mbus_config,
|
||||
.s_stream = mt9m111_s_stream,
|
||||
.g_frame_interval = mt9m111_g_frame_interval,
|
||||
.s_frame_interval = mt9m111_s_frame_interval,
|
||||
|
@ -1168,6 +1168,7 @@ static const struct v4l2_subdev_pad_ops mt9m111_subdev_pad_ops = {
|
|||
.set_selection = mt9m111_set_selection,
|
||||
.get_fmt = mt9m111_get_fmt,
|
||||
.set_fmt = mt9m111_set_fmt,
|
||||
.get_mbus_config = mt9m111_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops mt9m111_subdev_ops = {
|
||||
|
|
|
@ -648,8 +648,9 @@ static const struct v4l2_subdev_core_ops ov9640_core_ops = {
|
|||
};
|
||||
|
||||
/* Request bus settings on camera side */
|
||||
static int ov9640_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int ov9640_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
cfg->flags = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
|
||||
V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
|
||||
|
@ -661,13 +662,13 @@ static int ov9640_g_mbus_config(struct v4l2_subdev *sd,
|
|||
|
||||
static const struct v4l2_subdev_video_ops ov9640_video_ops = {
|
||||
.s_stream = ov9640_s_stream,
|
||||
.g_mbus_config = ov9640_g_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_pad_ops ov9640_pad_ops = {
|
||||
.enum_mbus_code = ov9640_enum_mbus_code,
|
||||
.get_selection = ov9640_get_selection,
|
||||
.set_fmt = ov9640_set_fmt,
|
||||
.get_mbus_config = ov9640_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops ov9640_subdev_ops = {
|
||||
|
|
|
@ -1602,8 +1602,9 @@ static int tc358743_dv_timings_cap(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int tc358743_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int tc358743_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct tc358743_state *state = to_state(sd);
|
||||
|
||||
|
@ -1836,7 +1837,6 @@ static const struct v4l2_subdev_video_ops tc358743_video_ops = {
|
|||
.s_dv_timings = tc358743_s_dv_timings,
|
||||
.g_dv_timings = tc358743_g_dv_timings,
|
||||
.query_dv_timings = tc358743_query_dv_timings,
|
||||
.g_mbus_config = tc358743_g_mbus_config,
|
||||
.s_stream = tc358743_s_stream,
|
||||
};
|
||||
|
||||
|
@ -1848,6 +1848,7 @@ static const struct v4l2_subdev_pad_ops tc358743_pad_ops = {
|
|||
.set_edid = tc358743_s_edid,
|
||||
.enum_dv_timings = tc358743_enum_dv_timings,
|
||||
.dv_timings_cap = tc358743_dv_timings_cap,
|
||||
.get_mbus_config = tc358743_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops tc358743_ops = {
|
||||
|
|
|
@ -1191,8 +1191,9 @@ static int tvp5150_get_selection(struct v4l2_subdev *sd,
|
|||
}
|
||||
}
|
||||
|
||||
static int tvp5150_g_mbus_config(struct v4l2_subdev *sd,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
static int tvp5150_get_mbus_config(struct v4l2_subdev *sd,
|
||||
unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct tvp5150 *decoder = to_tvp5150(sd);
|
||||
|
||||
|
@ -1721,7 +1722,6 @@ static const struct v4l2_subdev_video_ops tvp5150_video_ops = {
|
|||
.querystd = tvp5150_querystd,
|
||||
.s_stream = tvp5150_s_stream,
|
||||
.s_routing = tvp5150_s_routing,
|
||||
.g_mbus_config = tvp5150_g_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_vbi_ops tvp5150_vbi_ops = {
|
||||
|
@ -1739,6 +1739,7 @@ static const struct v4l2_subdev_pad_ops tvp5150_pad_ops = {
|
|||
.get_fmt = tvp5150_fill_fmt,
|
||||
.get_selection = tvp5150_get_selection,
|
||||
.set_selection = tvp5150_set_selection,
|
||||
.get_mbus_config = tvp5150_get_mbus_config,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops tvp5150_ops = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче