summaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-device.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-12-09 08:38:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:32:42 -0300
commit2096a5dcf9704f5a86ecba37169eb813aaf0431c (patch)
tree21e7d870302a7c6748667a785b465a7a84805228 /include/media/v4l2-device.h
parent0070d91e5b5ae594116202ab7d62d8264830b1cd (diff)
[media] v4l: subdev: Add device node support
Create a device node named subdevX for every registered subdev. As the device node is registered before the subdev core::s_config function is called, return -EGAIN on open until initialization completes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-device.h')
-rw-r--r--include/media/v4l2-device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index b16f307d471..78b11e5a6db 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-device.h
@@ -96,6 +96,12 @@ int __must_check v4l2_device_register_subdev(struct v4l2_device *v4l2_dev,
wasn't registered. In that case it will do nothing. */
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
+/* Register device nodes for all subdev of the v4l2 device that are marked with
+ * the V4L2_SUBDEV_FL_HAS_DEVNODE flag.
+ */
+int __must_check
+v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev);
+
/* Iterate over all subdevs. */
#define v4l2_device_for_each_subdev(sd, v4l2_dev) \
list_for_each_entry(sd, &(v4l2_dev)->subdevs, list)