Thread (63 messages) 63 messages, 11 authors, 2012-08-07

Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences

From: Stephen Warren <hidden>
Date: 2012-07-31 16:34:40
Also in: linux-devicetree, linux-fbdev, lkml

On 07/31/2012 04:32 AM, Alex Courbot wrote:
On 07/31/2012 07:45 AM, Stephen Warren wrote:
...
quoted
If the nodes have a unit address (i.e. end in "@n"), which they will
have to if all named "step" and there's more than one of them, then they
will need a matching reg property. Equally, the parent node will need
#address-cells and #size-cells too. So, the last couple lines would be:

        power-on-sequence {
            #address-cells = <1>;
            #size-cells = <0>;
            step@0 {
                reg = <0>;
That's precisely what I would like to avoid - I don't need the steps to
be numbered and I certainly have no use for a reg property. Isn't there
a way to make it simpler?
You may be able to get away without using the reg values in the code.
However, to have a semantically correct device tree, you really do need
all of those properties.

That said, I think you might need to use the reg values in code. I
believe there's no guarantee of the order in which nodes enumerate in
device tree, so you need to look at the reg property in order to find
the order in which to execute the nodes/steps.

... although perhaps the desire to avoid a dependency on DT ordering
applies more to the order in which devices instantiated from DT get
probed, rather than the order of low-level node enumeration, so I may be
wrong here. I've definitely seen Grant caution people not to rely on
device probe order, but perhaps he didn't make the same comment about
node order.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help