summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-06-24 18:50:29 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-17 14:45:50 +0200
commit8ae5640f1b4af2e903802f771ba6a8f0c3497cab (patch)
treed6f38dc36b4d82c49f66d64b170ad1036f6a27ae /include/media
parent[media] adv7842: Add support for control event notifications (diff)
downloadlinux-8ae5640f1b4af2e903802f771ba6a8f0c3497cab.tar.xz
linux-8ae5640f1b4af2e903802f771ba6a8f0c3497cab.zip
[media] Add helper function for subdev event notifications
Add a new helper function called v4l2_subdev_notify_event() which will deliver the specified event to both the v4l2 subdev event queue as well as to the notify callback. The former is typically used by userspace applications to listen to notification events while the later is used by bridge drivers. Combining both into the same function avoids boilerplate code in subdev drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-subdev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 4e18318eb425..370fc38c34f1 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -44,6 +44,7 @@
struct v4l2_device;
struct v4l2_ctrl_handler;
+struct v4l2_event;
struct v4l2_event_subscription;
struct v4l2_fh;
struct v4l2_subdev;
@@ -695,4 +696,7 @@ void v4l2_subdev_init(struct v4l2_subdev *sd,
#define v4l2_subdev_has_op(sd, o, f) \
((sd)->ops->o && (sd)->ops->o->f)
+void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
+ const struct v4l2_event *ev);
+
#endif