Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754971AbbFLT5S (ORCPT ); Fri, 12 Jun 2015 15:57:18 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35083 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752656AbbFLTzQ (ORCPT ); Fri, 12 Jun 2015 15:55:16 -0400 From: Pantelis Antoniou To: Rob Herring Cc: Grant Likely , Matt Porter , Koen Kooi , Guenter Roeck , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pantelis Antoniou , Pantelis Antoniou Subject: [PATCH 3/8] doc: dt: Document the indirect overlay method. Date: Fri, 12 Jun 2015 22:55:00 +0300 Message-Id: <1434138905-15886-4-git-send-email-pantelis.antoniou@konsulko.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1434138905-15886-1-git-send-email-pantelis.antoniou@konsulko.com> References: <1434138905-15886-1-git-send-email-pantelis.antoniou@konsulko.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2056 Lines: 51 Add a description of the indirect overlay method to the overlay documention file. Signed-off-by: Pantelis Antoniou --- 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 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= 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/