Re: [PATCH v1 1/3] of: base: Provide of_graph_get_port_parent()
From: Laurent Pinchart
Date: Thu May 18 2017 - 09:23:35 EST
On Wednesday 17 May 2017 21:02:42 Kieran Bingham wrote:
> On 17/05/17 17:36, Rob Herring wrote:
> > On Wed, May 17, 2017 at 10:03 AM, Kieran Bingham wrote:
> >> From: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>
> >> When handling endpoints, the v4l2 async framework needs to identify the
> >> parent device of a port endpoint.
> >> Adapt the existing of_graph_get_remote_port_parent() such that a caller
> >> can obtain the parent of a port without parsing the remote-endpoint
> >> first.
> > A similar patch is already applied as part of the ASoC graph card support.
> > Rob
> Ah yes, a quick google finds it...
> : https://patchwork.kernel.org/patch/9658907/
> Surprisingly similar patch ... and a familiar name.
Very similar indeed, down to identical problems ;-) Quoting your patch,
> + * of_graph_get_port_parent() - get port's parent node
> + * @node: pointer to a local endpoint device_node
> + *
> + * Return: device node associated with endpoint @node.
> + * Use of_node_put() on it when done.
> + */
The documentation of the return value is a bit confusing to me. I assume that,
by device node, you meant the DT node corresponding to the device of the
endpoint which is passed as an argument. However, device node cal also refer
to struct device_node. Should this be clarified ?
> Morimoto-san - you beat me to it :D !
> Thanks Rob, (And Morimoto!)