Commit 6d01bb9d authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman

tty/serial: of_serial: add DT alias ID handling

Add support for alias parsing from the DT. This allows for consistent
tty numbering.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9cef862
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment