From: Philipp Zabel <p.zabel@pengutronix.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Grant Likely <grant.likely@linaro.org>,
Greg KH <gregkh@linuxfoundation.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Rob Herring <robh+dt@kernel.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
devicetree@vger.kernel.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [GIT PULL] Move device tree graph parsing helpers to drivers/of
Date: Fri, 14 Mar 2014 13:19:39 +0100 [thread overview]
Message-ID: <1394799579.3710.24.camel@paszta.hi.pengutronix.de> (raw)
In-Reply-To: <6341585.ZqkoDDr3Wb@avalon>
Hi Laurent,
Am Donnerstag, den 13.03.2014, 18:13 +0100 schrieb Laurent Pinchart:
> Hi Philipp,
>
> On Thursday 13 March 2014 12:08:16 Philipp Zabel wrote:
> > Am Montag, den 10.03.2014, 14:37 +0000 schrieb Grant Likely:
> > > > > Nak. I made comments that haven't been resolved yet. I've replied with
> > > > > more detail tonight. The big issues are how drivers handle the
> > > > > optional 'ports' node and I do not agree to the double-linkage in the
> > > > > binding description.
> >
> > so as I understand it, nobody is against dropping the double-linkage *if* we
> > can agree on a way to recreate the backlinks in the kernel.
>
> I'm not sure about "nobody", but even though it might not be my favorite
> option I'd be OK with that.
Ok, I make that assumption going by the discussion about link direction
that ensued.
> > My current suggestion would be to parse the complete device tree into an
> > internal graph structure once, at boot to achieve this. This code could
> > look for the optional 'ports' node if and only if the parent device node
> > contains #address-cells != <1> or #size-cells != <0> properties.
>
> With backlinks in DT we can assume that, if a node is the target of a link, it
> will be compatible with the of-graph bindings, and thus parse the node to
> locate other ports and other links. This allows parsing the full graph without
> help of individual drivers.
Yes.
> Without backlinks in DT we need to parse the full DT to reconstruct backlinks
> in the kernel. One possible issue with that is that we can't know whether a
> node implements the of-graph bindings. We can use the heuristic you've
> described above, but I wonder if it could lead to problems. Grant pointed out
> that the compatibility string defines what binding a node uses, and that we
> can't thus look for properties randomly. I don't think there's a risk to
> interpret an unrelated node as part of a graph though.
False positives would just take up a bit of space in the endpoint lists,
but otherwise should be no problem, as they would only be used when
either a driver implementing the bindings is bound, or when they are
connected to other endpoints. Whether or not we scan the whole tree,
using this heuristic, is more a matter of principle.
> > People completely disagree about the direction the phandle links should
> > point in. I am still of the opinion that the generic binding should describe
> > just the topology, that the endpoint links in the kernel should represent an
> > undirected graph and the direction of links should not matter at all for the
> > generic graph bindings.
>
> I would also not mandate a specific direction at the of-graph level and leave
> it to subsystems (or possibly drivers) to specify the direction.
Thank you. Can everybody live with this?
regards
Philipp
next prev parent reply other threads:[~2014-03-14 12:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 17:13 [GIT PULL] Move device tree graph parsing helpers to drivers/of Philipp Zabel
2014-03-07 11:55 ` Russell King - ARM Linux
2014-03-07 12:20 ` Mauro Carvalho Chehab
2014-03-07 13:29 ` Russell King - ARM Linux
2014-03-07 18:23 ` Grant Likely
2014-03-10 13:26 ` Mauro Carvalho Chehab
[not found] ` < 20140307182330.75168C40AE3@trevor.secretlab.ca>
[not found] ` <20140310102630.3cb1bcd7@ samsung.com>
[not found] ` <20140310102630.3cb1bcd7-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-10 14:37 ` Grant Likely
[not found] ` <1394708896. 3577.21.camel@paszta.hi.pengutronix.de>
2014-03-11 11:12 ` Mauro Carvalho Chehab
2014-03-13 11:08 ` Philipp Zabel
[not found] ` <1394708896.3577.21.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>
2014-03-13 11:35 ` Russell King - ARM Linux
[not found] ` <20140313113527.GM21483-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-03-13 15:13 ` Sylwester Nawrocki
2014-03-13 15:37 ` Sylwester Nawrocki
2014-03-14 7:05 ` Robert Schwebel
[not found] ` <20140314070505.GV1629-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-17 23:30 ` Laurent Pinchart
2014-03-18 6:27 ` Tomi Valkeinen
2014-03-20 16:03 ` Grant Likely
2014-03-13 17:13 ` Laurent Pinchart
2014-03-14 12:19 ` Philipp Zabel [this message]
2014-03-14 12:44 ` Tomi Valkeinen
[not found] ` <1394799579.3710.24.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>
2014-03-17 23:41 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394799579.3710.24.camel@paszta.hi.pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=devicetree@vger.kernel.org \
--cc=g.liakhovetski@gmx.de \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=m.chehab@samsung.com \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).