Re: [PATCH] Add description of labels to source format chapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Nov 27, 2017 at 6:44 PM, Rob Herring <robh@xxxxxxxxxx> wrote:
> On Mon, Nov 27, 2017 at 10:14 AM, Grant Likely
> <grant.likely@xxxxxxxxxxxx> wrote:
>> The source format chapter was missing details about the characters that
>> are valid for labels and what labels are for. Add a paragraph to cover
>> those details.
>>
>> Signed-off-by: Grant Likely <grant.likely@xxxxxxx>
>> ---
>>  source/source-language.rst | 27 +++++++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>  mode change 100644 => 100755 source/source-language.rst
>>
>> diff --git a/source/source-language.rst b/source/source-language.rst
>> old mode 100644
>> new mode 100755
>> index cefbbd8..c17aab0
>> --- a/source/source-language.rst
>> +++ b/source/source-language.rst
>> @@ -22,6 +22,33 @@ additional files.
>>
>>      /include/ "FILE"
>>
>> +Labels
>> +------
>> +The source format support attaching labels to any node or property data in the device tree.
>
> s/support/supports/

Got it, thanks.

>
> What do you mean by property data? You can do:

I should say "property value" here. Labels can be placed almost
anywhere in the property data, but the only user of this is when
emitting asm output.

Here's the text from further down in that file:

-  Labels may also appear before or after any component of a property
   value, or between cells of a cell array, or between bytes of a
   bytestring. Examples:

::

        reg = reglabel: <0 sizelabel: 0x1000000>;
        prop = [ab cd ef byte4: 00 ff fe];
        str = start: "string value" end: ;


>
> label: foo = "bar";
>
> News to me if so. But how would one use that in a reference?

IIRC the intent was to allow dumb firmware to directly access part of
the DT data when it is assembled and linked into the firmware binary.

>
>> +Phandle and path references can be automatically generated by referencing the label instead of
>> +explicitly specifying the phandle value or the full path to a node.
>> +Labels are only used in the devicetree source format and are not encoded into the binary format.
>
> The last part is not true now with overlays (A mistake IMO, primarily
> because we have no standard around label names).

RIght. Would you be okay with leaving this as-is in this commit, to be
rewritten when overlay support is added to the spec?

Cheers,
g.
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux