aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/atmel_serial.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 2a1d52fb4936..f119d1761106 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1240,6 +1240,21 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
1240 spin_unlock_irqrestore(&port->lock, flags); 1240 spin_unlock_irqrestore(&port->lock, flags);
1241} 1241}
1242 1242
1243static void atmel_set_ldisc(struct uart_port *port, int new)
1244{
1245 int line = port->line;
1246
1247 if (line >= port->state->port.tty->driver->num)
1248 return;
1249
1250 if (port->state->port.tty->ldisc->ops->num == N_PPS) {
1251 port->flags |= UPF_HARDPPS_CD;
1252 atmel_enable_ms(port);
1253 } else {
1254 port->flags &= ~UPF_HARDPPS_CD;
1255 }
1256}
1257
1243/* 1258/*
1244 * Return string describing the specified port 1259 * Return string describing the specified port
1245 */ 1260 */
@@ -1380,6 +1395,7 @@ static struct uart_ops atmel_pops = {
1380 .shutdown = atmel_shutdown, 1395 .shutdown = atmel_shutdown,
1381 .flush_buffer = atmel_flush_buffer, 1396 .flush_buffer = atmel_flush_buffer,
1382 .set_termios = atmel_set_termios, 1397 .set_termios = atmel_set_termios,
1398 .set_ldisc = atmel_set_ldisc,
1383 .type = atmel_type, 1399 .type = atmel_type,
1384 .release_port = atmel_release_port, 1400 .release_port = atmel_release_port,
1385 .request_port = atmel_request_port, 1401 .request_port = atmel_request_port,