Skip to content

Commit

Permalink
serial: mxs-auart: enable PPS support
Browse files Browse the repository at this point in the history
Enables PPS support in mxs-auart serial driver to make PPS API working.

Signed-off-by: Janusz Uzycki <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
juzycki-elproma authored and gregkh committed Nov 6, 2014
1 parent f9e4239 commit 36a2627
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 36a2627

Please sign in to comment.