summaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-mc.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-05 10:16:18 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-10 04:23:44 -0500
commit7047f2982a223e0ecca480c11a37bd9edf62b65a (patch)
tree9b0db4e7a89f338b3b39e747fa2d70f07da3166b /include/media/v4l2-mc.h
parent8bf77f9e7013e46ca08151189357532f027c47e8 (diff)
[media] v4l2-mc: add an ancillary routine for PCI-based MC
Instead of copyping the same code on all PCI devices that would have a media controller, add a core ancillary routine. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media/v4l2-mc.h')
-rw-r--r--include/media/v4l2-mc.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
index aed9e9b87f82..6fad97277a0b 100644
--- a/include/media/v4l2-mc.h
+++ b/include/media/v4l2-mc.h
@@ -92,6 +92,10 @@ enum demod_pad_index {
92 DEMOD_NUM_PADS 92 DEMOD_NUM_PADS
93}; 93};
94 94
95
96struct pci_dev; /* We don't need to include pci.h here */
97
98#ifdef CONFIG_MEDIA_CONTROLLER
95/** 99/**
96 * v4l2_mc_create_media_graph() - create Media Controller links at the graph. 100 * v4l2_mc_create_media_graph() - create Media Controller links at the graph.
97 * 101 *
@@ -106,11 +110,29 @@ enum demod_pad_index {
106 * interface centric PC-consumer's hardware, V4L2 subdev centric camera 110 * interface centric PC-consumer's hardware, V4L2 subdev centric camera
107 * hardware should not use this routine, as it will not build the right graph. 111 * hardware should not use this routine, as it will not build the right graph.
108 */ 112 */
109#ifdef CONFIG_MEDIA_CONTROLLER
110int v4l2_mc_create_media_graph(struct media_device *mdev); 113int v4l2_mc_create_media_graph(struct media_device *mdev);
114
115/**
116 * v4l2_mc_pci_media_device_init() - create and initialize a
117 * struct &media_device from a PCI device.
118 *
119 * @pci_dev: pointer to struct pci_dev
120 * @name: media device name. If %NULL, the routine will use the default
121 * name for the pci device, given by pci_name() macro.
122 */
123struct media_device *v4l2_mc_pci_media_device_init(struct pci_dev *pci_dev,
124 char *name);
125
126
111#else 127#else
112static inline int v4l2_mc_create_media_graph(struct media_device *mdev) 128static inline int v4l2_mc_create_media_graph(struct media_device *mdev)
113{ 129{
114 return 0; 130 return 0;
115} 131}
132
133struct media_device *v4l2_mc_pci_media_device_init(struct pci_dev *pci_dev,
134 char *name) {
135 return NULL;
136}
137
116#endif 138#endif