linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: linux-serial@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>, Jiri Slaby <jslaby@suse.cz>,
	linux-arm-kernel@lists.infradead.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 1/3] tty/serial: of_serial: add DT alias ID handling
Date: Mon, 26 Jan 2015 22:50:07 -0600	[thread overview]
Message-ID: <1422334209-23125-1-git-send-email-robh@kernel.org> (raw)

Add support for alias parsing from the DT. This allows for consistent
tty numbering.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
---
 drivers/tty/serial/of_serial.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 64f1bab..3194b42 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -128,6 +128,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
 	if (of_find_property(np, "no-loopback-test", NULL))
 		port->flags |= UPF_SKIP_TEST;
 
+	ret = of_alias_get_id(np, "serial");
+	if (ret >= 0)
+		port->line = ret;
+
 	port->dev = &ofdev->dev;
 
 	switch (type) {
-- 
2.1.0

             reply	other threads:[~2015-01-27  4:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  4:50 Rob Herring [this message]
2015-01-27  4:50 ` [PATCH 2/3] tty/serial: of_serial: add support for PXA/MMP uarts Rob Herring
2015-01-27 12:44   ` Peter Hurley
2015-01-27 14:30     ` Rob Herring
2015-01-27 15:09       ` Peter Hurley
2015-01-27 16:44         ` Rob Herring
2015-01-27 19:43           ` Peter Hurley
2015-01-28 14:21             ` Rob Herring
2015-01-28 17:06               ` Peter Hurley
2015-01-28 17:37           ` Peter Hurley
2015-01-30 19:51             ` Rob Herring
2015-01-30 20:24               ` Peter Hurley
2015-02-01 17:07                 ` Peter Hurley
2015-01-27  4:50 ` [PATCH 3/3] tty/serial: 8250_early: Add support for PXA UARTs Rob Herring
2015-01-27 13:10   ` Peter Hurley
2015-01-27 14:05     ` Rob Herring
2015-01-27 14:25       ` Peter Hurley

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=1422334209-23125-1-git-send-email-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.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).