diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-subdev.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 3276065022ef..0f9937be53d2 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -37,6 +37,8 @@ | |||
37 | 37 | ||
38 | struct v4l2_device; | 38 | struct v4l2_device; |
39 | struct v4l2_ctrl_handler; | 39 | struct v4l2_ctrl_handler; |
40 | struct v4l2_event_subscription; | ||
41 | struct v4l2_fh; | ||
40 | struct v4l2_subdev; | 42 | struct v4l2_subdev; |
41 | struct tuner_setup; | 43 | struct tuner_setup; |
42 | 44 | ||
@@ -161,6 +163,10 @@ struct v4l2_subdev_core_ops { | |||
161 | int (*s_power)(struct v4l2_subdev *sd, int on); | 163 | int (*s_power)(struct v4l2_subdev *sd, int on); |
162 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, | 164 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, |
163 | u32 status, bool *handled); | 165 | u32 status, bool *handled); |
166 | int (*subscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh, | ||
167 | struct v4l2_event_subscription *sub); | ||
168 | int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh, | ||
169 | struct v4l2_event_subscription *sub); | ||
164 | }; | 170 | }; |
165 | 171 | ||
166 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. | 172 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. |
@@ -437,6 +443,8 @@ struct v4l2_subdev_internal_ops { | |||
437 | #define V4L2_SUBDEV_FL_IS_SPI (1U << 1) | 443 | #define V4L2_SUBDEV_FL_IS_SPI (1U << 1) |
438 | /* Set this flag if this subdev needs a device node. */ | 444 | /* Set this flag if this subdev needs a device node. */ |
439 | #define V4L2_SUBDEV_FL_HAS_DEVNODE (1U << 2) | 445 | #define V4L2_SUBDEV_FL_HAS_DEVNODE (1U << 2) |
446 | /* Set this flag if this subdev generates events. */ | ||
447 | #define V4L2_SUBDEV_FL_HAS_EVENTS (1U << 3) | ||
440 | 448 | ||
441 | /* Each instance of a subdev driver should create this struct, either | 449 | /* Each instance of a subdev driver should create this struct, either |
442 | stand-alone or embedded in a larger struct. | 450 | stand-alone or embedded in a larger struct. |
@@ -460,6 +468,8 @@ struct v4l2_subdev { | |||
460 | void *host_priv; | 468 | void *host_priv; |
461 | /* subdev device node */ | 469 | /* subdev device node */ |
462 | struct video_device devnode; | 470 | struct video_device devnode; |
471 | /* number of events to be allocated on open */ | ||
472 | unsigned int nevents; | ||
463 | }; | 473 | }; |
464 | 474 | ||
465 | #define vdev_to_v4l2_subdev(vdev) \ | 475 | #define vdev_to_v4l2_subdev(vdev) \ |