Skip to content

Commit ae45cd5

Browse files
Niklas Söderlundmchehab
authored andcommitted
[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>
1 parent fbf1e94 commit ae45cd5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/media/media-entity.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <linux/bitmap.h>
2323
#include <linux/bug.h>
24+
#include <linux/fwnode.h>
2425
#include <linux/kernel.h>
2526
#include <linux/list.h>
2627
#include <linux/media.h>
@@ -171,6 +172,9 @@ struct media_pad {
171172

172173
/**
173174
* struct media_entity_operations - Media entity operations
175+
* @get_fwnode_pad: Return the pad number based on a fwnode endpoint or
176+
* a negative value on error. This operation can be used
177+
* to map a fwnode to a media pad number. Optional.
174178
* @link_setup: Notify the entity of link changes. The operation can
175179
* return an error, in which case link setup will be
176180
* cancelled. Optional.
@@ -184,6 +188,7 @@ struct media_pad {
184188
* mutex held.
185189
*/
186190
struct media_entity_operations {
191+
int (*get_fwnode_pad)(struct fwnode_endpoint *endpoint);
187192
int (*link_setup)(struct media_entity *entity,
188193
const struct media_pad *local,
189194
const struct media_pad *remote, u32 flags);

0 commit comments

Comments
 (0)