All of lore.kernel.org
 help / color / mirror / Atom feed
* V4L2 endpoint parser doesn't support empty ports
@ 2014-06-09  8:22 Nikhil Devshatwar
  2014-06-09  9:18 ` Sylwester Nawrocki
  0 siblings, 1 reply; 2+ messages in thread
From: Nikhil Devshatwar @ 2014-06-09  8:22 UTC (permalink / raw)
  To: linux-media, s.nawrocki, g.liakhovetski

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?
=> Does it make sense to create a new function which can iterate over
a specific port?

Thanks,
Nikhil D

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: V4L2 endpoint parser doesn't support empty ports
  2014-06-09  8:22 V4L2 endpoint parser doesn't support empty ports Nikhil Devshatwar
@ 2014-06-09  9:18 ` Sylwester Nawrocki
  0 siblings, 0 replies; 2+ messages in thread
From: Sylwester Nawrocki @ 2014-06-09  9:18 UTC (permalink / raw)
  To: Nikhil Devshatwar; +Cc: linux-media, g.liakhovetski

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-09  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09  8:22 V4L2 endpoint parser doesn't support empty ports Nikhil Devshatwar
2014-06-09  9:18 ` Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.