@@ -378,6 +378,15 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
return -ENOTTY;
return v4l2_querymenu(vfh->ctrl_handler, arg);
+ case VIDIOC_ENUMINPUT:
+ return v4l2_subdev_call(sd, video, enuminput, arg);
+
+ case VIDIOC_G_INPUT:
+ return v4l2_subdev_call(sd, video, g_input, arg);
+
+ case VIDIOC_S_INPUT:
+ return v4l2_subdev_call(sd, video, s_input, *(u32 *)arg);
+
case VIDIOC_G_CTRL:
if (!vfh->ctrl_handler)
return -ENOTTY;
@@ -383,6 +383,14 @@ struct v4l2_mbus_frame_desc {
* @g_input_status: get input status. Same as the status field in the
* &struct &v4l2_input
*
+ * @enuminput: enumerate inputs. Should return the same input status as
+ * @g_input_status if the passed input index is the currently active
+ * input.
+ *
+ * @g_input: returns the currently active input index.
+ *
+ * @s_input: set the active input.
+ *
* @s_stream: used to notify the driver that a video stream will start or has
* stopped.
*
@@ -423,6 +431,9 @@ struct v4l2_subdev_video_ops {
int (*g_tvnorms)(struct v4l2_subdev *sd, v4l2_std_id *std);
int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
+ int (*enuminput)(struct v4l2_subdev *sd, struct v4l2_input *input);
+ int (*g_input)(struct v4l2_subdev *sd, u32 *index);
+ int (*s_input)(struct v4l2_subdev *sd, u32 index);
int (*s_stream)(struct v4l2_subdev *sd, int enable);
int (*g_pixelaspect)(struct v4l2_subdev *sd, struct v4l2_fract *aspect);
int (*g_frame_interval)(struct v4l2_subdev *sd,