Skip to content

media: entity: add operation to help map DT node to media pad

Niklas Söderlund linux-media linux-renesas-soc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: entity: Add pad_from_fwnode entity operationinclude/media/media-entity.h+6 -03 replies
2/2media: entity: Add media_entity_pad_from_fwnode() functiondrivers/media/media-entity.c include/media/media-entity.h+61 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] media: entity: add operation to help map DT node to media pad

From: Niklas Söderlund <[email protected]>

Hi,

This series add a new entity operation which will aid capture drivers to map a port/endpoint in DT to a media graph pad.

This series is implemented support for the ongoing ADV748x work by Kieran Bingham. In his work he have a driver which registers more then one subdevice. So when a driver finds this subdevice it must be able to ask the subdevice itself which pad number correspond to the DT endpoint the driver used to bind subdevice in the first place.

This is tested on Renesas H3 and M3-W together with the Renesas CSI-2 and VIN Gen3 driver (posted separately). It is based on top of Sakaris pull request '[GIT PULL FOR v4.13] V4L2 fwnode support'.

* Changes since v1
- Rebased work ontop of Sakaris fwnode branch and make use of the fwnode instead of the raw DT port/reg numbers.
- Do not assume DT port is equal to pad number if the driver do not implement the lookup function. Instead search for the first pad with the correct direction and use that. Thanks Sakari for the suggestion!
- Use ENXIO instead of EINVAL to signal lookup error.

Niklas Söderlund (2):
media: entity: Add pad_from_fwnode entity operation
media: entity: Add media_entity_pad_from_fwnode() function

 drivers/media/media-entity.c | 39 +++++++++++++++++++++++++++++++++++++++
 include/media/media-entity.h | 28 ++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
Signature · 1 line
2.13.0