diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2015-06-03 17:12:53 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 15:05:48 +0100 |
commit | d062f91193dbd5a0c1d8469c8517ec8dd552c3f2 (patch) | |
tree | 0fc61740f5da65f8c599bb7658d92d25f5ff019c /include/media/media-device.h | |
parent | [media] rc: sunxi-cir: Initialize the spinlock properly (diff) | |
download | linux-d062f91193dbd5a0c1d8469c8517ec8dd552c3f2.tar.xz linux-d062f91193dbd5a0c1d8469c8517ec8dd552c3f2.zip |
[media] media: new media controller API for device resource support
Add new media controller API to allocate media device as a
device resource. When a media device is created on the main
struct device which is the parent device for the interface
device, it will be available to all drivers associated with
that interface. For example, if a usb media device driver
creates the media device on the main struct device which is
common for all the drivers that control the media device,
including the non-media ALSA driver, media controller API
can be used to share access to the resources on the media
device. This new interface provides the above described
feature. A second interface that finds and returns the media
device is added to allow drivers to find the media device
created by any of the drivers associated with the device.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h index 6e6db78f1ee2..22792cd5b1d1 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -95,6 +95,8 @@ void media_device_unregister(struct media_device *mdev); int __must_check media_device_register_entity(struct media_device *mdev, struct media_entity *entity); void media_device_unregister_entity(struct media_entity *entity); +struct media_device *media_device_get_devres(struct device *dev); +struct media_device *media_device_find_devres(struct device *dev); /* Iterate over all entities. */ #define media_device_for_each_entity(entity, mdev) \ |