diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-08-01 18:05:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 03:53:27 -0400 |
commit | f0beea8f46142ea7abd7ed3f44fd0967c603fae0 (patch) | |
tree | 66b74b8b01eeb051faabeb8bb94ce64c1dbfb3e4 /include | |
parent | 7cd5a16b22af7dc92190a60f336b6854a6fcb99d (diff) |
[media] v4l: subdev: Add new file operations
V4L2 sub-devices store pad formats and crop settings in the file handle.
To let drivers initialize those settings properly, add an open operation
that is called when the subdev is opened as well as a corresponding
close operation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-subdev.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 72f49eb3002b..f5dddacf8499 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -42,6 +42,7 @@ struct v4l2_ctrl_handler; | |||
42 | struct v4l2_event_subscription; | 42 | struct v4l2_event_subscription; |
43 | struct v4l2_fh; | 43 | struct v4l2_fh; |
44 | struct v4l2_subdev; | 44 | struct v4l2_subdev; |
45 | struct v4l2_subdev_fh; | ||
45 | struct tuner_setup; | 46 | struct tuner_setup; |
46 | 47 | ||
47 | /* decode_vbi_line */ | 48 | /* decode_vbi_line */ |
@@ -431,10 +432,16 @@ struct v4l2_subdev_ops { | |||
431 | * | 432 | * |
432 | * unregistered: called when this subdev is unregistered. When called the | 433 | * unregistered: called when this subdev is unregistered. When called the |
433 | * v4l2_dev field is still set to the correct v4l2_device. | 434 | * v4l2_dev field is still set to the correct v4l2_device. |
435 | * | ||
436 | * open: called when the subdev device node is opened by an application. | ||
437 | * | ||
438 | * close: called when the subdev device node is closed. | ||
434 | */ | 439 | */ |
435 | struct v4l2_subdev_internal_ops { | 440 | struct v4l2_subdev_internal_ops { |
436 | int (*registered)(struct v4l2_subdev *sd); | 441 | int (*registered)(struct v4l2_subdev *sd); |
437 | void (*unregistered)(struct v4l2_subdev *sd); | 442 | void (*unregistered)(struct v4l2_subdev *sd); |
443 | int (*open)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); | ||
444 | int (*close)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); | ||
438 | }; | 445 | }; |
439 | 446 | ||
440 | #define V4L2_SUBDEV_NAME_SIZE 32 | 447 | #define V4L2_SUBDEV_NAME_SIZE 32 |