devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Brian Norris
	<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: DTC: appending / concatenating to a path reference
Date: Fri, 23 Jan 2015 16:28:43 -0800	[thread overview]
Message-ID: <20150124002843.GV9759@ld-irv-0074> (raw)

Hi DT folks,

In taking a look at the /chosen/stdout-path (and
/chosen/linux,stdout-path) properties described in ePAPR and in
Documentation/devicetree/bindings/chosen.txt, I see that one can use a
path name reference, followed by a colon (':') and an options string to
add options to a particular console. e.g.:

/ {
	serial@f000 {
		...
	};

	chosen {
		stdout-path = "/serial@f000:115200";
	};
}

When there are no options to append, DTS syntax can easily handle this
for you with the '&' operator, to automatically generate a path name:

/ {
	uart: serial@f000 {
		...
	};

	chosen {
		stdout-path = &uart;
	};
};

However, it appears the device tree compiler provides no syntax for
concatenating anything to a path. I see there was an RFC patch set for
more general expression support [1], though it doesn't handle everything
I'd like. For instance, with the proposed syntax, I could imagine doing
this:

/ {
	uart: serial@f000 {
		...
	};

	chosen {
		stdout-path = &uart + ":115200";
	};
};

though that patch set doesn't handle this.

Thoughts? What's the status with DTS language extensions like [1]?

Regards,
Brian

[1] http://thread.gmane.org/gmane.comp.devicetree.compiler/3/
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2015-01-24  0:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150124002843.GV9759@ld-irv-0074 \
    --to=computersforpeace-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@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).