From: Alexey Ignatov <lexszero@gmail.com>
To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Alexey Ignatov" <lexszero@gmail.com>
Subject: [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option
Date: Tue, 18 Apr 2017 19:54:33 +0300 [thread overview]
Message-ID: <20170418165434.21252-1-lexszero@gmail.com> (raw)
Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
---
drivers/tty/serial/imx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a70356dad1b7..38c55c309953 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2048,6 +2048,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
if (of_get_property(np, "fsl,dte-mode", NULL))
sport->dte_mode = 1;
+ if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
+ sport->port.rs485.flags |= SER_RS485_ENABLED;
return 0;
}
#else
@@ -2109,7 +2111,7 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->port.fifosize = 32;
sport->port.ops = &imx_pops;
sport->port.rs485_config = imx_rs485_config;
- sport->port.rs485.flags =
+ sport->port.rs485.flags |=
SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
sport->port.flags = UPF_BOOT_AUTOCONF;
init_timer(&sport->timer);
--
2.12.2
next reply other threads:[~2017-04-18 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 16:54 Alexey Ignatov [this message]
2017-04-18 16:54 ` [PATCH 2/2] serial: imx: allow enabling RX during TX operation with DT option Alexey Ignatov
2017-04-18 17:36 ` [PATCH 1/2] serial: imx: support enabling rs485 at boot time " Greg KH
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=20170418165434.21252-1-lexszero@gmail.com \
--to=lexszero@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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