devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Kushwaha Prabhakar-B32579
	<B32579-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Devicetree Discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: alias variable support
Date: Mon, 5 Dec 2011 10:09:19 +1100	[thread overview]
Message-ID: <20111204230919.GA4620@truffala.fritz.box> (raw)
In-Reply-To: <071A08F2C6A57E4E94D980ECA553F87441D37C-TcFNo7jSaXM0vywKSws3iq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.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

      parent reply	other threads:[~2011-12-04 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 10:14 alias variable support Kushwaha Prabhakar-B32579
     [not found] ` <071A08F2C6A57E4E94D980ECA553F87441D37C-TcFNo7jSaXM0vywKSws3iq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2011-12-04 23:09   ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111204230919.GA4620@truffala.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=B32579-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).