diff options
author | Viktar Palstsiuk <viktar.palstsiuk@promwad.com> | 2011-02-09 09:26:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 14:26:12 -0500 |
commit | 42bd7a4f68e7785dce656a379c3de0a74f5a4d84 (patch) | |
tree | 50957b021b63fabc59305f7f439c712c7305417f /drivers/tty/serial/atmel_serial.c | |
parent | daaf6ff42d12c89f179868387c0107db6625f0f3 (diff) |
atmel_serial: enable PPS support
Enables PPS support in atmel serial driver to make PPS API working.
Signed-off-by: Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/atmel_serial.c')
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 16 |
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 | ||
1243 | static 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, |