Commit 38b317ca authored by Paweł Anikiel's avatar Paweł Anikiel Committed by Hans Verkuil

media: i2c: tc358743: Switch dv timing callbacks to pad ops

Change all (s|g|query)_dv_timings subdev callbacks to include
a pad argument.
Signed-off-by: default avatarPaweł Anikiel <panikiel@google.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: align to open parenthesis]
parent e1c216dd
......@@ -1521,11 +1521,14 @@ static int tc358743_g_input_status(struct v4l2_subdev *sd, u32 *status)
return 0;
}
static int tc358743_s_dv_timings(struct v4l2_subdev *sd,
static int tc358743_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings)
{
struct tc358743_state *state = to_state(sd);
if (pad != 0)
return -EINVAL;
if (!timings)
return -EINVAL;
......@@ -1553,11 +1556,14 @@ static int tc358743_s_dv_timings(struct v4l2_subdev *sd,
return 0;
}
static int tc358743_g_dv_timings(struct v4l2_subdev *sd,
static int tc358743_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings)
{
struct tc358743_state *state = to_state(sd);
if (pad != 0)
return -EINVAL;
*timings = state->timings;
return 0;
......@@ -1573,11 +1579,14 @@ static int tc358743_enum_dv_timings(struct v4l2_subdev *sd,
&tc358743_timings_cap, NULL, NULL);
}
static int tc358743_query_dv_timings(struct v4l2_subdev *sd,
struct v4l2_dv_timings *timings)
static int tc358743_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_dv_timings *timings)
{
int ret;
if (pad != 0)
return -EINVAL;
ret = tc358743_get_detected_timings(sd, timings);
if (ret)
return ret;
......@@ -1822,9 +1831,6 @@ static const struct v4l2_subdev_core_ops tc358743_core_ops = {
static const struct v4l2_subdev_video_ops tc358743_video_ops = {
.g_input_status = tc358743_g_input_status,
.s_dv_timings = tc358743_s_dv_timings,
.g_dv_timings = tc358743_g_dv_timings,
.query_dv_timings = tc358743_query_dv_timings,
.s_stream = tc358743_s_stream,
};
......@@ -1834,6 +1840,9 @@ static const struct v4l2_subdev_pad_ops tc358743_pad_ops = {
.get_fmt = tc358743_get_fmt,
.get_edid = tc358743_g_edid,
.set_edid = tc358743_s_edid,
.s_dv_timings = tc358743_s_dv_timings,
.g_dv_timings = tc358743_g_dv_timings,
.query_dv_timings = tc358743_query_dv_timings,
.enum_dv_timings = tc358743_enum_dv_timings,
.dv_timings_cap = tc358743_dv_timings_cap,
.get_mbus_config = tc358743_get_mbus_config,
......@@ -2110,7 +2119,7 @@ static int tc358743_probe(struct i2c_client *client)
tc358743_initial_setup(sd);
tc358743_s_dv_timings(sd, &default_timing);
tc358743_s_dv_timings(sd, 0, &default_timing);
tc358743_set_csi_color_space(sd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment