From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: claudio@evidence.eu.com, alan@lxorguk.ukuu.org.uk, br@pwrnet.de,
greg@kroah.com, phdm@macqel.be
Subject: + serial-general-fixes-in-the-serial_rs485-structure.patch added to -mm tree
Date: Thu, 03 Jun 2010 12:50:47 -0700 [thread overview]
Message-ID: <201006031950.o53Jol3j012005@imap1.linux-foundation.org> (raw)
The patch titled
serial: general fixes in the serial_rs485 structure
has been added to the -mm tree. Its filename is
serial-general-fixes-in-the-serial_rs485-structure.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: serial: general fixes in the serial_rs485 structure
From: Claudio Scordino <claudio@evidence.eu.com>
Fix several issues related to the RS485 interface:
- It adds the flag SER_RS485_RTS_BEFORE_SEND that was missing from the
serial_rs485 structure (even if "delay_rts_before_send" was existing)
- It adds a further "delay_rts_after_send" field for those drivers that
can have a delay after send (e.g., atmel_serial)
- It fixes the usage of the structure in the atmel_serial driver (where
"delay_rts_before_send" should be used instead of "delay_rts_after_send").
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Bernhard Roth <br@pwrnet.de>
Cc: Philippe De Muyter <phdm@macqel.be>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/serial/atmel_serial.c | 11 ++++++++---
include/linux/serial.h | 4 +++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff -puN drivers/serial/atmel_serial.c~serial-general-fixes-in-the-serial_rs485-structure drivers/serial/atmel_serial.c
--- a/drivers/serial/atmel_serial.c~serial-general-fixes-in-the-serial_rs485-structure
+++ a/drivers/serial/atmel_serial.c
@@ -216,7 +216,8 @@ void atmel_config_rs485(struct uart_port
if (rs485conf->flags & SER_RS485_ENABLED) {
dev_dbg(port->dev, "Setting UART to RS485\n");
atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
- UART_PUT_TTGR(port, rs485conf->delay_rts_before_send);
+ if (rs485conf->flags & SER_RS485_RTS_AFTER_SEND)
+ UART_PUT_TTGR(port, rs485conf->delay_rts_after_send);
mode |= ATMEL_US_USMODE_RS485;
} else {
dev_dbg(port->dev, "Setting UART to RS232\n");
@@ -291,7 +292,9 @@ static void atmel_set_mctrl(struct uart_
if (atmel_port->rs485.flags & SER_RS485_ENABLED) {
dev_dbg(port->dev, "Setting UART to RS485\n");
- UART_PUT_TTGR(port, atmel_port->rs485.delay_rts_before_send);
+ if (atmel_port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
+ UART_PUT_TTGR(port,
+ atmel_port->rs485.delay_rts_after_send);
mode |= ATMEL_US_USMODE_RS485;
} else {
dev_dbg(port->dev, "Setting UART to RS232\n");
@@ -1210,7 +1213,9 @@ static void atmel_set_termios(struct uar
if (atmel_port->rs485.flags & SER_RS485_ENABLED) {
dev_dbg(port->dev, "Setting UART to RS485\n");
- UART_PUT_TTGR(port, atmel_port->rs485.delay_rts_before_send);
+ if (atmel_port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
+ UART_PUT_TTGR(port,
+ atmel_port->rs485.delay_rts_after_send);
mode |= ATMEL_US_USMODE_RS485;
} else {
dev_dbg(port->dev, "Setting UART to RS232\n");
diff -puN include/linux/serial.h~serial-general-fixes-in-the-serial_rs485-structure include/linux/serial.h
--- a/include/linux/serial.h~serial-general-fixes-in-the-serial_rs485-structure
+++ a/include/linux/serial.h
@@ -210,8 +210,10 @@ struct serial_rs485 {
#define SER_RS485_ENABLED (1 << 0)
#define SER_RS485_RTS_ON_SEND (1 << 1)
#define SER_RS485_RTS_AFTER_SEND (1 << 2)
+#define SER_RS485_RTS_BEFORE_SEND (1 << 3)
__u32 delay_rts_before_send; /* Milliseconds */
- __u32 padding[6]; /* Memory is cheap, new structs
+ __u32 delay_rts_after_send; /* Milliseconds */
+ __u32 padding[5]; /* Memory is cheap, new structs
are a royal PITA .. */
};
_
Patches currently in -mm which might be from claudio@evidence.eu.com are
serial-general-fixes-in-the-serial_rs485-structure.patch
reply other threads:[~2010-06-03 19:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201006031950.o53Jol3j012005@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=br@pwrnet.de \
--cc=claudio@evidence.eu.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=phdm@macqel.be \
/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