From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
"Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>,
Lukas Wunner <lukas@wunner.de>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH 2/2] serial: 8250_fintek: Disable delays for ports != 0
Date: Mon, 6 Nov 2017 11:49:13 +0100 [thread overview]
Message-ID: <20171106104913.2553-2-ricardo.ribalda@gmail.com> (raw)
In-Reply-To: <20171106104913.2553-1-ricardo.ribalda@gmail.com>
According to the datasheet, only the first port supports delay before
send and delay after send.
Reported-by: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/tty/serial/8250/8250_fintek.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index ca7e96f9f080..61745d4bea31 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -216,6 +216,12 @@ static int fintek_8250_rs485_config(struct uart_port *port,
rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
SER_RS485_RTS_AFTER_SEND;
+ /* Only the first port supports delays */
+ if (pdata->index) {
+ rs485->delay_rts_before_send = 0;
+ rs485->delay_rts_after_send = 0;
+ }
+
if (rs485->delay_rts_before_send) {
rs485->delay_rts_before_send = 1;
config |= TXW4C_IRA;
--
2.14.2
next prev parent reply other threads:[~2017-11-06 10:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 10:49 [PATCH 1/2] serial: 8250_fintek: Return -EINVAL on invalid configuration Ricardo Ribalda Delgado
2017-11-06 10:49 ` Ricardo Ribalda Delgado [this message]
2017-11-22 22:31 ` [PATCH 2/2] serial: 8250_fintek: Disable delays for ports != 0 Ricardo Ribalda Delgado
2017-11-22 22:30 ` [PATCH 1/2] serial: 8250_fintek: Return -EINVAL on invalid configuration Ricardo Ribalda Delgado
2017-11-23 5:03 ` Lukas Wunner
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=20171106104913.2553-2-ricardo.ribalda@gmail.com \
--to=ricardo.ribalda@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpeter@gmail.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lukas@wunner.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