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 2/2] serial: imx: allow enabling RX during TX operation with DT option
Date: Tue, 18 Apr 2017 19:54:34 +0300 [thread overview]
Message-ID: <20170418165434.21252-2-lexszero@gmail.com> (raw)
In-Reply-To: <20170418165434.21252-1-lexszero@gmail.com>
This commit changes the driver behaviour: new default is no RX during
TX when RS485 is also enabled, so boards requiring this should explicitly
enable rs485-rx-during-tx in their device trees.
Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
---
drivers/tty/serial/imx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 38c55c309953..a1d4ed71312f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2050,6 +2050,10 @@ static int serial_imx_probe_dt(struct imx_port *sport,
if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
sport->port.rs485.flags |= SER_RS485_ENABLED;
+
+ if (of_get_property(np, "rs485-rx-during-tx", NULL))
+ sport->port.rs485.flags |= SER_RS485_RX_DURING_TX;
+
return 0;
}
#else
@@ -2112,7 +2116,7 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->port.ops = &imx_pops;
sport->port.rs485_config = imx_rs485_config;
sport->port.rs485.flags |=
- SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
+ SER_RS485_RTS_ON_SEND;
sport->port.flags = UPF_BOOT_AUTOCONF;
init_timer(&sport->timer);
sport->timer.function = imx_timeout;
--
2.12.2
next prev parent reply other threads:[~2017-04-18 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 16:54 [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option Alexey Ignatov
2017-04-18 16:54 ` Alexey Ignatov [this message]
2017-04-18 17:36 ` 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-2-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