Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-06 Thread Laurent Pinchart
Hi Tomi, On Tuesday 04 March 2014 14:21:09 Tomi Valkeinen wrote: On 04/03/14 13:36, Philipp Zabel wrote: Am Dienstag, den 04.03.2014, 10:58 +0200 schrieb Tomi Valkeinen: [...] [snip] Then, about the get_remote functions: I think there should be only one function for that purpose, one

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-05 Thread Tomi Valkeinen
On 04/03/14 17:47, Philipp Zabel wrote: Am Dienstag, den 04.03.2014, 14:21 +0200 schrieb Tomi Valkeinen: On 04/03/14 13:36, Philipp Zabel wrote: [...] Can port_node be NULL? Probably only if something is quite wrong, but maybe it's safer to return error in that case. both

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-04 Thread Tomi Valkeinen
Hi Philipp, On 27/02/14 19:35, Philipp Zabel wrote: This patch adds a new struct of_endpoint which is then embedded in struct v4l2_of_endpoint and contains the endpoint properties that are not V4L2 (or even media) specific: the port number, endpoint id, local device tree node and remote

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-04 Thread Philipp Zabel
Am Freitag, den 28.02.2014, 22:09 +0100 schrieb Sylwester Nawrocki: [...] --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1985,6 +1985,37 @@ struct device_node *of_find_next_cache_node(const struct device_node *np) } /** + * of_graph_parse_endpoint() - parse common

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-04 Thread Philipp Zabel
Hi Tomi, Am Dienstag, den 04.03.2014, 10:58 +0200 schrieb Tomi Valkeinen: [...] +int of_graph_parse_endpoint(const struct device_node *node, + struct of_endpoint *endpoint) +{ + struct device_node *port_node = of_get_parent(node); Can port_node be NULL? Probably

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-04 Thread Tomi Valkeinen
On 04/03/14 13:36, Philipp Zabel wrote: Hi Tomi, Am Dienstag, den 04.03.2014, 10:58 +0200 schrieb Tomi Valkeinen: [...] +int of_graph_parse_endpoint(const struct device_node *node, + struct of_endpoint *endpoint) +{ + struct device_node *port_node =

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-03-04 Thread Philipp Zabel
Am Dienstag, den 04.03.2014, 14:21 +0200 schrieb Tomi Valkeinen: On 04/03/14 13:36, Philipp Zabel wrote: [...] Can port_node be NULL? Probably only if something is quite wrong, but maybe it's safer to return error in that case. both of_property_read_u32 and of_node_put can handle

Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-02-28 Thread Sylwester Nawrocki
On 02/27/2014 06:35 PM, Philipp Zabel wrote: This patch adds a new struct of_endpoint which is then embedded in struct v4l2_of_endpoint and contains the endpoint properties that are not V4L2 (or even media) specific: the port number, endpoint id, local device tree node and remote endpoint

[PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of

2014-02-27 Thread Philipp Zabel
This patch adds a new struct of_endpoint which is then embedded in struct v4l2_of_endpoint and contains the endpoint properties that are not V4L2 (or even media) specific: the port number, endpoint id, local device tree node and remote endpoint phandle. of_graph_parse_endpoint parses those