projects/linux·commit 5dfbd1d7

atmel_serial: fix RTS high after initialization in RS485 mode

5dfbd1d7 · Claudio Scordino <[email protected]> · 2011-01-13 15:45:39 -08:00

When working in RS485 mode, the atmel_serial driver keeps RTS high after
the initialization of the serial port.  It goes low only after the first
character has been sent.

[[email protected]: simplify code]
Signed-off-by: Claudio Scordino <[email protected]>
Signed-off-by: Arkadiusz Bubala <[email protected]>
Tested-by: Arkadiusz Bubala <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
5dfbd1d734ef5415bc47b034df7433ba21e40e7b
Parents
6c9ae009

Changes

1 files changed · +5 −0

FileStatusAddDelContent
drivers/serial/atmel_serial.cmodified+5−0View file

drivers/serial/atmel_serial.c

View file
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 3892666..2a1d52f 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1732,6 +1732,11 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, 1);
platform_set_drvdata(pdev, port);
+ if (port->rs485.flags & SER_RS485_ENABLED) {
+ UART_PUT_MR(&port->uart, ATMEL_US_USMODE_NORMAL);
+ UART_PUT_CR(&port->uart, ATMEL_US_RTSEN);
+ }
+
return 0;
err_add_port: