diff options
author | Janusz Uzycki <j.uzycki@elproma.com.pl> | 2014-10-10 18:53:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-06 14:57:18 -0800 |
commit | 36a262782b045220bfccf89bd2c4d78cbe152c8e (patch) | |
tree | 7cc5d3d9cbbae97907af772b6dce378a5ce61ec0 /drivers/tty/serial/mxs-auart.c | |
parent | f9e42397d79b6e810437ba1130b0b4b594f5e56c (diff) | |
download | linux-36a262782b045220bfccf89bd2c4d78cbe152c8e.tar.bz2 |
serial: mxs-auart: enable PPS support
Enables PPS support in mxs-auart serial driver to make PPS API working.
Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/mxs-auart.c')
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 088f1e17b33e..386b52894056 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -784,6 +784,16 @@ static void mxs_auart_settermios(struct uart_port *u, mxs_auart_disable_ms(u); } +static void mxs_auart_set_ldisc(struct uart_port *port, int new) +{ + if (new == N_PPS) { + port->flags |= UPF_HARDPPS_CD; + mxs_auart_enable_ms(port); + } else { + port->flags &= ~UPF_HARDPPS_CD; + } +} + static irqreturn_t mxs_auart_irq_handle(int irq, void *context) { u32 istat; @@ -949,6 +959,7 @@ static struct uart_ops mxs_auart_ops = { .startup = mxs_auart_startup, .shutdown = mxs_auart_shutdown, .set_termios = mxs_auart_settermios, + .set_ldisc = mxs_auart_set_ldisc, .type = mxs_auart_type, .release_port = mxs_auart_release_port, .request_port = mxs_auart_request_port, |