All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] tty/serial: of_serial: add DT alias ID handling
@ 2015-01-27  4:50 ` Rob Herring
  0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2015-01-27  4:50 UTC (permalink / raw)
  To: linux-serial
  Cc: Rob Herring, Jiri Slaby, linux-arm-kernel, Greg Kroah-Hartman

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

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2015-02-01 17:07 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-27  4:50 [PATCH 1/3] tty/serial: of_serial: add DT alias ID handling Rob Herring
2015-01-27  4:50 ` Rob Herring
2015-01-27  4:50 ` [PATCH 2/3] tty/serial: of_serial: add support for PXA/MMP uarts Rob Herring
2015-01-27  4:50   ` Rob Herring
2015-01-27 12:44   ` Peter Hurley
2015-01-27 12:44     ` Peter Hurley
2015-01-27 14:30     ` Rob Herring
2015-01-27 14:30       ` Rob Herring
2015-01-27 15:09       ` Peter Hurley
2015-01-27 15:09         ` Peter Hurley
2015-01-27 16:44         ` Rob Herring
2015-01-27 16:44           ` Rob Herring
2015-01-27 19:43           ` Peter Hurley
2015-01-27 19:43             ` Peter Hurley
2015-01-28 14:21             ` Rob Herring
2015-01-28 14:21               ` Rob Herring
2015-01-28 17:06               ` Peter Hurley
2015-01-28 17:06                 ` Peter Hurley
2015-01-28 17:37           ` Peter Hurley
2015-01-28 17:37             ` Peter Hurley
2015-01-30 19:51             ` Rob Herring
2015-01-30 19:51               ` Rob Herring
2015-01-30 20:24               ` Peter Hurley
2015-01-30 20:24                 ` Peter Hurley
2015-02-01 17:07                 ` 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  4:50   ` Rob Herring
2015-01-27 13:10   ` Peter Hurley
2015-01-27 13:10     ` Peter Hurley
2015-01-27 14:05     ` Rob Herring
2015-01-27 14:05       ` Rob Herring
2015-01-27 14:25       ` Peter Hurley
2015-01-27 14:25         ` Peter Hurley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.