From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: alias variable support Date: Mon, 5 Dec 2011 10:09:19 +1100 Message-ID: <20111204230919.GA4620@truffala.fritz.box> References: <071A08F2C6A57E4E94D980ECA553F87441D37C@039-SN1MPN1-004.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87441D37C-TcFNo7jSaXM0vywKSws3iq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Kushwaha Prabhakar-B32579 Cc: Devicetree Discuss List-Id: devicetree@vger.kernel.org On Fri, Dec 02, 2011 at 10:14:47AM +0000, Kushwaha Prabhakar-B32579 wrote: > Hi, > > Is there a way in dts to have alias for a variable just like we have alias for node. > > For example for a node "abc" > > > alias_comp = "comp-2.0" > > abc@3100 { > #address-cells = <1>; > #size-cells = <0>; > cell-index = <1>; > compatible = alias_comp > reg = <0x3100 0x100>; > }; > > Here alias_comp will be replaced by "comp-2.0" during compilation. That's not really an alias, or like one. It is more like a named constant / variable. We don't have support for this, but it is something we'd like to add to dtc eventually. It's just that no-one has had time to design, implement and come up with a decent syntax for it. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson