summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvcvideo.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-01-21 05:39:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-25 19:50:58 -0300
commit4ffc2d89f38a7fbb3b24adb7fb066a159c351c11 (patch)
treee325f7ab0e917bd3bae8e7217107e7d0d0cceeeb /drivers/media/video/uvc/uvcvideo.h
parent5a254d751e52e0f817090c29950d16cf18490d5b (diff)
downloadtalos-op-linux-4ffc2d89f38a7fbb3b24adb7fb066a159c351c11.tar.gz
talos-op-linux-4ffc2d89f38a7fbb3b24adb7fb066a159c351c11.zip
[media] uvcvideo: Register subdevices for each entity
Userspace applications can now discover the UVC device topology using the media controller API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r--drivers/media/video/uvc/uvcvideo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h
index aab7508f2bd2..3906f6ed4061 100644
--- a/drivers/media/video/uvc/uvcvideo.h
+++ b/drivers/media/video/uvc/uvcvideo.h
@@ -98,6 +98,7 @@ struct uvc_xu_control {
#ifdef __KERNEL__
#include <linux/poll.h>
+#include <linux/usb.h>
#include <linux/usb/video.h>
#include <linux/uvcvideo.h>
#include <media/media-device.h>
@@ -303,6 +304,12 @@ struct uvc_entity {
__u16 type;
char name[64];
+ /* Media controller-related fields. */
+ struct v4l2_subdev subdev;
+ unsigned int num_pads;
+ unsigned int num_links;
+ struct media_pad *pads;
+
union {
struct {
__u16 wObjectiveFocalLengthMin;
@@ -589,6 +596,8 @@ extern unsigned int uvc_timeout_param;
/* Core driver */
extern struct uvc_driver uvc_driver;
+extern struct uvc_entity *uvc_entity_by_id(struct uvc_device *dev, int id);
+
/* Video buffers queue management. */
extern void uvc_queue_init(struct uvc_video_queue *queue,
enum v4l2_buf_type type, int drop_corrupted);
@@ -622,6 +631,10 @@ static inline int uvc_queue_streaming(struct uvc_video_queue *queue)
/* V4L2 interface */
extern const struct v4l2_file_operations uvc_fops;
+/* Media controller */
+extern int uvc_mc_register_entities(struct uvc_video_chain *chain);
+extern void uvc_mc_cleanup_entity(struct uvc_entity *entity);
+
/* Video */
extern int uvc_video_init(struct uvc_streaming *stream);
extern int uvc_video_suspend(struct uvc_streaming *stream);
OpenPOWER on IntegriCloud