From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753787AbcEQM6o (ORCPT ); Tue, 17 May 2016 08:58:44 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:33532 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbcEQM6m (ORCPT ); Tue, 17 May 2016 08:58:42 -0400 MIME-Version: 1.0 In-Reply-To: <1463429892-3369-7-git-send-email-pantelis.antoniou@konsulko.com> References: <1463429892-3369-1-git-send-email-pantelis.antoniou@konsulko.com> <1463429892-3369-7-git-send-email-pantelis.antoniou@konsulko.com> From: Rob Herring Date: Tue, 17 May 2016 07:58:22 -0500 Message-ID: Subject: Re: [PATCH v2 6/6] doc: dt: Document the target root overlay method To: Pantelis Antoniou Cc: Frank Rowand , Matt Porter , Grant Likely , Koen Kooi , Guenter Roeck , Marek Vasut , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Pantelis Antoniou Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 16, 2016 at 3:18 PM, Pantelis Antoniou wrote: > Add a description of the target root overlay method to the overlay > documention file. > > Signed-off-by: Pantelis Antoniou > --- > Documentation/devicetree/overlay-notes.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt > index 6995fc1..3e8df30 100644 > --- a/Documentation/devicetree/overlay-notes.txt > +++ b/Documentation/devicetree/overlay-notes.txt > @@ -104,6 +104,10 @@ 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_target_index() method to select the target. > > +For overlays on probeable busses, use the of_overlay_create_target_root() method > +in which you supply a device node as a target root, and which all target > +references in the overlay are performed relative to that node. This needs a better explanation and an example. "Applying overlays to multiple places for probeable busses" is not sufficient. Describe what is the problem/flow, and then how does the implementation work. I don't think this problem is limited to probeable busses either. Not knowing the target to apply the overlay to is the same problem for connectors with non-probeable signals. I find a couple of things problematic with the implementation. There's no way to validate that an overlay should apply to a base node. If users just always make the target "/", then any overlay can apply to any location the nodes could apply anywhere. It requires a kernel change for every location you want to apply the overlay to. Maybe I don't understand the usecase. I feel like we are creating too many syntax's to apply overlays. I get that there are different usecases, but that doesn't necessarily mean the syntax needs to be different. > + > Overlay DTS Format > ------------------ > > @@ -141,3 +145,7 @@ contains the information required to map from a phandle to a tree location. > Using a target index requires the use of a selector target on the call to > of_overlay_create_target_index(). I.e. passing an index of 0 will select the > target in the foo node, an index of 1 the bar node, etc. > + > +Note that when using the target root create method all target references must > +lie under the target root node. I.e. the overlay is not allowed to 'break' out > +of the root. That is not enforceable though, right? Rob