summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2017-06-15 06:17:25 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 09:08:47 -0300
commitae45cd5efc1202448e4df97e342727f025f35444 (patch)
treee39c6af12fc8becdc2e6909b9ff7d8ec5a4f196a /include/media
parentfbf1e94f0055d825f8d56b3abe322f37ba818d5a (diff)
downloadlinux-rpi-ae45cd5efc1202448e4df97e342727f025f35444.tar.gz
linux-rpi-ae45cd5efc1202448e4df97e342727f025f35444.tar.bz2
linux-rpi-ae45cd5efc1202448e4df97e342727f025f35444.zip
[media] media: entity: Add get_fwnode_pad entity operation
The optional operation can be used by entities to report how it maps its fwnode endpoints to media pad numbers. This is useful for devices which require advanced mappings of pads. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-entity.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index c7c254c5bca1..46eeb036aa33 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -21,6 +21,7 @@
#include <linux/bitmap.h>
#include <linux/bug.h>
+#include <linux/fwnode.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/media.h>
@@ -171,6 +172,9 @@ struct media_pad {
/**
* struct media_entity_operations - Media entity operations
+ * @get_fwnode_pad: Return the pad number based on a fwnode endpoint or
+ * a negative value on error. This operation can be used
+ * to map a fwnode to a media pad number. Optional.
* @link_setup: Notify the entity of link changes. The operation can
* return an error, in which case link setup will be
* cancelled. Optional.
@@ -184,6 +188,7 @@ struct media_pad {
* mutex held.
*/
struct media_entity_operations {
+ int (*get_fwnode_pad)(struct fwnode_endpoint *endpoint);
int (*link_setup)(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags);