提交 ae45cd5e 编写于 作者: N Niklas Söderlund 提交者: Mauro Carvalho Chehab

[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: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 fbf1e94f
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/bitmap.h> #include <linux/bitmap.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/fwnode.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/media.h> #include <linux/media.h>
...@@ -171,6 +172,9 @@ struct media_pad { ...@@ -171,6 +172,9 @@ struct media_pad {
/** /**
* struct media_entity_operations - Media entity operations * 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 * @link_setup: Notify the entity of link changes. The operation can
* return an error, in which case link setup will be * return an error, in which case link setup will be
* cancelled. Optional. * cancelled. Optional.
...@@ -184,6 +188,7 @@ struct media_pad { ...@@ -184,6 +188,7 @@ struct media_pad {
* mutex held. * mutex held.
*/ */
struct media_entity_operations { struct media_entity_operations {
int (*get_fwnode_pad)(struct fwnode_endpoint *endpoint);
int (*link_setup)(struct media_entity *entity, int (*link_setup)(struct media_entity *entity,
const struct media_pad *local, const struct media_pad *local,
const struct media_pad *remote, u32 flags); const struct media_pad *remote, u32 flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册