From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Subject: [PATCH 1/3] overlay: Documentation for the overlay sugar syntax Date: Wed, 14 Jun 2017 17:53:04 +0300 Message-ID: <1497451986-15515-2-git-send-email-pantelis.antoniou@konsulko.com> References: <1497451986-15515-1-git-send-email-pantelis.antoniou@konsulko.com> Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=094scoFHSYbQOAB6HlBwuEIniiKlbItUYr8YPGXp9tc=; b=cVJAqdI8bzH0Fsajq8Rnt8fsAaeJY9bI4zVIUDTCqPuQD8l+vyDuCIRdAO7A48XZAo /q4P5jDRsr1Dpgonn3fW5B0UEKNtJP+nUZ8qfcSwirH859uHaNOV8IxtgculdltWC5Es tFDQissPU1lnyKdD1hXZ2gCg8j1CNH9QoWr9M= In-Reply-To: <1497451986-15515-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Gibson Cc: Tom Rini , Nishanth Menon , Tero Kristo , Frank Rowand , Rob Herring , Simon Glass , Devicetree Compiler , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pantelis Antoniou There exists a syntactic sugar version of overlays which make them simpler to write for the trivial case of a single target. Document it in the device tree object internals. Signed-off-by: Pantelis Antoniou --- Documentation/dt-object-internal.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/dt-object-internal.txt b/Documentation/dt-object-internal.txt index 51d68ab..624aa43 100644 --- a/Documentation/dt-object-internal.txt +++ b/Documentation/dt-object-internal.txt @@ -308,3 +308,20 @@ the run time loader must apply an offset to each phandle in every dynamic DT object loaded. The __local_fixups__ node records the offset relative to the start of every local reference within that property so that the loader can apply the offset. + +There is an alternative syntax to the expanded form for overlays with phandle +targets which makes the format similar to the one using in .dtsi include files. + +So for the &ocp target example above one can simply write: + +/dts-v1/; +/plugin/; +&ocp { + /* bar peripheral */ + bar { + compatible = "corp,bar"; + ... /* various properties and child nodes */ + } +}; + +The resulting dtb object is identical. -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html