aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-async.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-async.h')
-rw-r--r--include/media/v4l2-async.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index 1d6d7da4c45d..8e2a236a4d03 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -23,6 +23,19 @@ struct v4l2_async_notifier;
23/* A random max subdevice number, used to allocate an array on stack */ 23/* A random max subdevice number, used to allocate an array on stack */
24#define V4L2_MAX_SUBDEVS 128U 24#define V4L2_MAX_SUBDEVS 128U
25 25
26/**
27 * enum v4l2_async_match_type - type of asynchronous subdevice logic to be used
28 * in order to identify a match
29 *
30 * @V4L2_ASYNC_MATCH_CUSTOM: Match will use the logic provided by &struct
31 * v4l2_async_subdev.match ops
32 * @V4L2_ASYNC_MATCH_DEVNAME: Match will use the device name
33 * @V4L2_ASYNC_MATCH_I2C: Match will check for I2C adapter ID and address
34 * @V4L2_ASYNC_MATCH_OF: Match will use OF node
35 *
36 * This enum is used by the asyncrhronous sub-device logic to define the
37 * algorithm that will be used to match an asynchronous device.
38 */
26enum v4l2_async_match_type { 39enum v4l2_async_match_type {
27 V4L2_ASYNC_MATCH_CUSTOM, 40 V4L2_ASYNC_MATCH_CUSTOM,
28 V4L2_ASYNC_MATCH_DEVNAME, 41 V4L2_ASYNC_MATCH_DEVNAME,
@@ -91,9 +104,35 @@ struct v4l2_async_notifier {
91 struct v4l2_async_subdev *asd); 104 struct v4l2_async_subdev *asd);
92}; 105};
93 106
107/**
108 * v4l2_async_notifier_register - registers a subdevice asynchronous notifier
109 *
110 * @v4l2_dev: pointer to &struct v4l2_device
111 * @notifier: pointer to &struct v4l2_async_notifier
112 */
94int v4l2_async_notifier_register(struct v4l2_device *v4l2_dev, 113int v4l2_async_notifier_register(struct v4l2_device *v4l2_dev,
95 struct v4l2_async_notifier *notifier); 114 struct v4l2_async_notifier *notifier);
115
116/**
117 * v4l2_async_notifier_unregister - unregisters a subdevice asynchronous notifier
118 *
119 * @notifier: pointer to &struct v4l2_async_notifier
120 */
96void v4l2_async_notifier_unregister(struct v4l2_async_notifier *notifier); 121void v4l2_async_notifier_unregister(struct v4l2_async_notifier *notifier);
122
123/**
124 * v4l2_async_register_subdev - registers a sub-device to the asynchronous
125 * subdevice framework
126 *
127 * @sd: pointer to &struct v4l2_subdev
128 */
97int v4l2_async_register_subdev(struct v4l2_subdev *sd); 129int v4l2_async_register_subdev(struct v4l2_subdev *sd);
130
131/**
132 * v4l2_async_unregister_subdev - unregisters a sub-device to the asynchronous
133 * subdevice framework
134 *
135 * @sd: pointer to &struct v4l2_subdev
136 */
98void v4l2_async_unregister_subdev(struct v4l2_subdev *sd); 137void v4l2_async_unregister_subdev(struct v4l2_subdev *sd);
99#endif 138#endif