Hi Nikhil,

On 09/06/14 10:22, Nikhil Devshatwar wrote:
> Hi everyboady,
> 
> When using V4l2 endpoint framework for parsing device tree nodes,
> 
> I don't find any API which can allow me to iterate over all the
> endpoints in a specific port
> 
> Currectly we have v4l2_of_get_next_endpoint which can be used to
> iterate over all the endpoints
> under that device_node
> 
> Typically, SoCs have multiple video ports in a video IP
> We want a way to iterate over only the endpoints which belong to a certain 
> port
> It isn't possible with this
> 
> Also, Ideally, all the port definitions are in DTSI file whereas the
> endpoints would be defined
> in a DTS file overriding the port nodes
> 
> So it is quite possible that we have some ports where nothing is connected,
> v4l2_of_get_next_endpoint fails as soon as it gets the empty endpoint
> 
> 2 questions
> => Should we modify the v4l2_of_get_next_endpoint function to ignore
> empty endpoints?

Laurent addressed this issue with patch: 
https://patchwork.linuxtv.org/patch/22927
I'm not sure what kernel version you are using. Such changes are already
in Linus' tree, however git history might not be straightforward due
to merge conflict resolutions. See commit 3c83e61 
"Merge branch 'v4l_for_linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media"

> => Does it make sense to create a new function which can iterate over
> a specific port?

The 'port' node can have only 'endpoint' subnodes, so once you get hold
of the port node it should be as easy as iterating over its children ?

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to