aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/media-device.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-13 08:36:58 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:19:13 -0200
commitb6e4ca8129ad65a0b1552586c1d42d2fd219661e (patch)
tree157421429da8296725c7a6e0c04111aa2a9f753e /include/media/media-device.h
parent[media] media-entity.h: Document some ancillary functions (diff)
downloadlinux-dev-b6e4ca8129ad65a0b1552586c1d42d2fd219661e.tar.xz
linux-dev-b6e4ca8129ad65a0b1552586c1d42d2fd219661e.zip
[media] media-device.h: document the last functions
Add kernel-doc documentation for media_device_get_devres and media_device_find_devres. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media/media-device.h')
-rw-r--r--include/media/media-device.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 215a0d88241d..ebc2f3a239eb 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -449,7 +449,29 @@ int __must_check media_device_register_entity(struct media_device *mdev,
* the driver if required.
*/
void media_device_unregister_entity(struct media_entity *entity);
+
+/**
+ * media_device_get_devres() - get media device as device resource
+ * creates if one doesn't exist
+ *
+ * @dev: pointer to struct &device.
+ *
+ * Sometimes, the media controller &media_device needs to be shared by more
+ * than one driver. This function adds support for that, by dynamically
+ * allocating the &media_device and allowing it to be obtained from the
+ * struct &device associated with the common device where all sub-device
+ * components belong. So, for example, on an USB device with multiple
+ * interfaces, each interface may be handled by a separate per-interface
+ * drivers. While each interface have its own &device, they all share a
+ * common &device associated with the hole USB device.
+ */
struct media_device *media_device_get_devres(struct device *dev);
+
+/**
+ * media_device_find_devres() - find media device as device resource
+ *
+ * @dev: pointer to struct &device.
+ */
struct media_device *media_device_find_devres(struct device *dev);
/* Iterate over all entities. */