Commit 3fc767e2 authored by Enrico Scholz's avatar Enrico Scholz

media:mxc-mipi-csi2_yav: implemented selection API

Signed-off-by: Enrico Scholz's avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
parent 5fa71f6b
......@@ -418,6 +418,32 @@ static int mipi_csi2_get_fmt(struct v4l2_subdev *sd,
return v4l2_subdev_call(sensor_sd, pad, get_fmt, NULL, fmt);
}
static int mipi_csi2_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_selection *s)
{
struct mxc_mipi_csi2_dev *csi2dev = sd_to_mxc_mipi_csi2_dev(sd);
struct v4l2_subdev *sensor_sd = csi2dev->sensor_sd;
if (s->pad)
return -EINVAL;
return v4l2_subdev_call(sensor_sd, pad, get_selection, NULL, s);
}
static int mipi_csi2_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_selection *s)
{
struct mxc_mipi_csi2_dev *csi2dev = sd_to_mxc_mipi_csi2_dev(sd);
struct v4l2_subdev *sensor_sd = csi2dev->sensor_sd;
if (s->pad)
return -EINVAL;
return v4l2_subdev_call(sensor_sd, pad, set_selection, NULL, s);
}
static int mipi_csi2_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *fmt)
......@@ -464,6 +490,8 @@ static struct v4l2_subdev_pad_ops mipi_csi2_pad_ops = {
.enum_mbus_code = mipi_csis_enum_mbus_code,
.get_fmt = mipi_csi2_get_fmt,
.set_fmt = mipi_csi2_set_fmt,
.get_selection = mipi_csi2_get_selection,
.set_selection = mipi_csi2_set_selection,
};
static struct v4l2_subdev_core_ops mipi_csi2_core_ops = {
......
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