Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1397238 > unrolled thread

[PATCH 3/6] doc: dt: Document the indirect overlay method.

Started byPantelis Antoniou <pantelis.antoniou@konsulko.com>
First post2016-05-09 20:10 +0200
Last post2016-05-10 16:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/6] doc: dt: Document the indirect overlay method. Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2016-05-09 20:10 +0200
    Re: [PATCH 3/6] doc: dt: Document the indirect overlay method. Rob Herring <robherring2@gmail.com> - 2016-05-10 00:00 +0200
      Re: [PATCH 3/6] doc: dt: Document the indirect overlay method. Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2016-05-10 16:00 +0200
        Re: [PATCH 3/6] doc: dt: Document the indirect overlay method. Rob Herring <robherring2@gmail.com> - 2016-05-10 16:40 +0200

#1397238 — [PATCH 3/6] doc: dt: Document the indirect overlay method.

FromPantelis Antoniou <pantelis.antoniou@konsulko.com>
Date2016-05-09 20:10 +0200
Subject[PATCH 3/6] doc: dt: Document the indirect overlay method.
Message-ID<rwXN0-2kB-7@gated-at.bofh.it>
Add a description of the indirect overlay method to the overlay
documention file.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 Documentation/devicetree/overlay-notes.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
index d418a6c..dd595e6 100644
--- a/Documentation/devicetree/overlay-notes.txt
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -100,6 +100,10 @@ Finally, if you need to remove all overlays in one-go, just call
 of_overlay_destroy_all() which will remove every single one in the correct
 order.
 
+If your board has multiple slots/places where a single overlay can work
+and each slot is defined by a node, you can use the of_overlay_create_indirect()
+method to select the target.
+
 Overlay DTS Format
 ------------------
 
@@ -113,6 +117,11 @@ The DTS of an overlay should have the following format:
 		target=<phandle>;	/* phandle target of the overlay */
 	or
 		target-path="/path";	/* target path of the overlay */
+	or
+		target-indirect {	/* indirect target selector */
+			foo { target|target-path ... };
+			bar { .... };
+		};
 
 		__overlay__ {
 			property-a;	/* add property-a to the target */
@@ -131,3 +140,7 @@ Using the non-phandle based target method allows one to use a base DT which does
 not contain a __symbols__ node, i.e. it was not compiled with the -@ option.
 The __symbols__ node is only required for the target=<phandle> method, since it
 contains the information required to map from a phandle to a tree location.
+
+The indirect target requires the use of a selector target on the call to
+of_overlay_create_indirect(). I.e. passing the "foo" id will select the target
+in the foo node, "bar" in bar node, etc.
-- 
1.7.12

[toc] | [next] | [standalone]


#1397430

FromRob Herring <robherring2@gmail.com>
Date2016-05-10 00:00 +0200
Message-ID<rx1nB-5F3-25@gated-at.bofh.it>
In reply to#1397238
On Mon, May 9, 2016 at 1:05 PM, Pantelis Antoniou
<pantelis.antoniou@konsulko.com> wrote:
> Add a description of the indirect overlay method to the overlay
> documention file.

Why? Please write some decent commit messages.

> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  Documentation/devicetree/overlay-notes.txt | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
> index d418a6c..dd595e6 100644
> --- a/Documentation/devicetree/overlay-notes.txt
> +++ b/Documentation/devicetree/overlay-notes.txt
> @@ -100,6 +100,10 @@ Finally, if you need to remove all overlays in one-go, just call
>  of_overlay_destroy_all() which will remove every single one in the correct
>  order.
>
> +If your board has multiple slots/places where a single overlay can work
> +and each slot is defined by a node, you can use the of_overlay_create_indirect()
> +method to select the target.
> +
>  Overlay DTS Format
>  ------------------
>
> @@ -113,6 +117,11 @@ The DTS of an overlay should have the following format:
>                 target=<phandle>;       /* phandle target of the overlay */
>         or
>                 target-path="/path";    /* target path of the overlay */

Why not just let these take multiple values and the user just selects index?

> +       or
> +               target-indirect {       /* indirect target selector */
> +                       foo { target|target-path ... };
> +                       bar { .... };
> +               };
>
>                 __overlay__ {
>                         property-a;     /* add property-a to the target */
> @@ -131,3 +140,7 @@ Using the non-phandle based target method allows one to use a base DT which does
>  not contain a __symbols__ node, i.e. it was not compiled with the -@ option.
>  The __symbols__ node is only required for the target=<phandle> method, since it
>  contains the information required to map from a phandle to a tree location.
> +
> +The indirect target requires the use of a selector target on the call to
> +of_overlay_create_indirect(). I.e. passing the "foo" id will select the target
> +in the foo node, "bar" in bar node, etc.
> --
> 1.7.12
>

[toc] | [prev] | [next] | [standalone]


#1398119

FromPantelis Antoniou <pantelis.antoniou@konsulko.com>
Date2016-05-10 16:00 +0200
Message-ID<rxgmB-3mZ-5@gated-at.bofh.it>
In reply to#1397430
Hi Rob,

> On May 10, 2016, at 00:59 , Rob Herring <robherring2@gmail.com> wrote:
> 
> On Mon, May 9, 2016 at 1:05 PM, Pantelis Antoniou
> <pantelis.antoniou@konsulko.com> wrote:
>> Add a description of the indirect overlay method to the overlay
>> documention file.
> 
> Why? Please write some decent commit messages.
> 
>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>> ---
>> Documentation/devicetree/overlay-notes.txt | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
>> index d418a6c..dd595e6 100644
>> --- a/Documentation/devicetree/overlay-notes.txt
>> +++ b/Documentation/devicetree/overlay-notes.txt
>> @@ -100,6 +100,10 @@ Finally, if you need to remove all overlays in one-go, just call
>> of_overlay_destroy_all() which will remove every single one in the correct
>> order.
>> 
>> +If your board has multiple slots/places where a single overlay can work
>> +and each slot is defined by a node, you can use the of_overlay_create_indirect()
>> +method to select the target.
>> +
>> Overlay DTS Format
>> ------------------
>> 
>> @@ -113,6 +117,11 @@ The DTS of an overlay should have the following format:
>>                target=<phandle>;       /* phandle target of the overlay */
>>        or
>>                target-path="/path";    /* target path of the overlay */
> 
> Why not just let these take multiple values and the user just selects index?
> 

Implementation details. Usually there’s a descriptive label used for each
different target point. It could be a slot# or it could be a label…

A string selector maps better IMO.


>> +       or
>> +               target-indirect {       /* indirect target selector */
>> +                       foo { target|target-path ... };
>> +                       bar { .... };
>> +               };
>> 
>>                __overlay__ {
>>                        property-a;     /* add property-a to the target */
>> @@ -131,3 +140,7 @@ Using the non-phandle based target method allows one to use a base DT which does
>> not contain a __symbols__ node, i.e. it was not compiled with the -@ option.
>> The __symbols__ node is only required for the target=<phandle> method, since it
>> contains the information required to map from a phandle to a tree location.
>> +
>> +The indirect target requires the use of a selector target on the call to
>> +of_overlay_create_indirect(). I.e. passing the "foo" id will select the target
>> +in the foo node, "bar" in bar node, etc.
>> --
>> 1.7.12
>> 

Regards

— Pantelis

[toc] | [prev] | [next] | [standalone]


#1398159

FromRob Herring <robherring2@gmail.com>
Date2016-05-10 16:40 +0200
Message-ID<rxgZk-42L-33@gated-at.bofh.it>
In reply to#1398119
On Tue, May 10, 2016 at 8:59 AM, Pantelis Antoniou
<pantelis.antoniou@konsulko.com> wrote:
> Hi Rob,
>
>> On May 10, 2016, at 00:59 , Rob Herring <robherring2@gmail.com> wrote:
>>
>> On Mon, May 9, 2016 at 1:05 PM, Pantelis Antoniou
>> <pantelis.antoniou@konsulko.com> wrote:
>>> Add a description of the indirect overlay method to the overlay
>>> documention file.
>>
>> Why? Please write some decent commit messages.
>>
>>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>>> ---
>>> Documentation/devicetree/overlay-notes.txt | 13 +++++++++++++
>>> 1 file changed, 13 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
>>> index d418a6c..dd595e6 100644
>>> --- a/Documentation/devicetree/overlay-notes.txt
>>> +++ b/Documentation/devicetree/overlay-notes.txt
>>> @@ -100,6 +100,10 @@ Finally, if you need to remove all overlays in one-go, just call
>>> of_overlay_destroy_all() which will remove every single one in the correct
>>> order.
>>>
>>> +If your board has multiple slots/places where a single overlay can work
>>> +and each slot is defined by a node, you can use the of_overlay_create_indirect()
>>> +method to select the target.
>>> +
>>> Overlay DTS Format
>>> ------------------
>>>
>>> @@ -113,6 +117,11 @@ The DTS of an overlay should have the following format:
>>>                target=<phandle>;       /* phandle target of the overlay */
>>>        or
>>>                target-path="/path";    /* target path of the overlay */
>>
>> Why not just let these take multiple values and the user just selects index?
>>
>
> Implementation details. Usually there’s a descriptive label used for each
> different target point. It could be a slot# or it could be a label…
>
> A string selector maps better IMO.

Then add "target-names" perhaps.

What I really don't like is 3 different ways to specify the target and
having to maintain them (I'm not sure why we allowed 2 to start
with.). Come up with a single way that works for 1 or more targets. If
that is different than the current way, then let's deprecate the old
way.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web