aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/tvp7002.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index f650f0d125eb..6ebbf1759187 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -991,6 +991,23 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
991 return 0; 991 return 0;
992} 992}
993 993
994/*
995 * tvp7002_enum_dv_presets() - Enum supported digital video formats
996 * @sd: pointer to standard V4L2 sub-device structure
997 * @preset: pointer to format struct
998 *
999 * Enumerate supported digital video formats.
1000 */
1001static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd,
1002 struct v4l2_dv_enum_preset *preset)
1003{
1004 /* Check requested format index is within range */
1005 if (preset->index >= NUM_PRESETS)
1006 return -EINVAL;
1007
1008 return v4l_fill_dv_preset_info(tvp7002_presets[preset->index].preset, preset);
1009}
1010
994/* V4L2 core operation handlers */ 1011/* V4L2 core operation handlers */
995static const struct v4l2_subdev_core_ops tvp7002_core_ops = { 1012static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
996 .g_chip_ident = tvp7002_g_chip_ident, 1013 .g_chip_ident = tvp7002_g_chip_ident,
@@ -1006,6 +1023,7 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
1006 1023
1007/* Specific video subsystem operation handlers */ 1024/* Specific video subsystem operation handlers */
1008static const struct v4l2_subdev_video_ops tvp7002_video_ops = { 1025static const struct v4l2_subdev_video_ops tvp7002_video_ops = {
1026 .enum_dv_presets = tvp7002_enum_dv_presets,
1009 .s_dv_preset = tvp7002_s_dv_preset, 1027 .s_dv_preset = tvp7002_s_dv_preset,
1010 .query_dv_preset = tvp7002_query_dv_preset, 1028 .query_dv_preset = tvp7002_query_dv_preset,
1011 .s_stream = tvp7002_s_stream, 1029 .s_stream = tvp7002_s_stream,