OSDN Git Service

media: v4l: fwnode: Support generic parsing of graph endpoints in a device
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 17 Aug 2017 15:28:21 +0000 (11:28 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 17:47:21 +0000 (13:47 -0400)
commit9ca4653121329595443df4e7a458154e8f745edf
tree9dc37b156e612526f15da07c3e99f0cc719e67fd
parentd65b34135ff86e8e04144ccdfcc2824127e0a7e8
media: v4l: fwnode: Support generic parsing of graph endpoints in a device

Add two functions for parsing devices graph endpoints:
v4l2_async_notifier_parse_fwnode_endpoints and
v4l2_async_notifier_parse_fwnode_endpoints_by_port. The former iterates
over all endpoints whereas the latter only iterates over the endpoints in
a given port.

The former is mostly useful for existing drivers that currently implement
the iteration over all the endpoints themselves whereas the latter is
especially intended for devices with both sinks and sources: async
sub-devices for external devices connected to the device's sources will
have already been set up, or the external sub-devices are part of the
master device.

Depends-on: ("device property: preserve usecount for node passed to of_fwnode_graph_get_port_parent()")

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-async.c
drivers/media/v4l2-core/v4l2-fwnode.c
include/media/v4l2-async.h
include/media/v4l2-fwnode.h