Commit 36a26278 authored by Janusz Uzycki's avatar Janusz Uzycki Committed by Greg Kroah-Hartman

serial: mxs-auart: enable PPS support

Enables PPS support in mxs-auart serial driver to make PPS API working.
Signed-off-by: default avatarJanusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9e42397
...@@ -784,6 +784,16 @@ static void mxs_auart_settermios(struct uart_port *u, ...@@ -784,6 +784,16 @@ static void mxs_auart_settermios(struct uart_port *u,
mxs_auart_disable_ms(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) static irqreturn_t mxs_auart_irq_handle(int irq, void *context)
{ {
u32 istat; u32 istat;
...@@ -949,6 +959,7 @@ static struct uart_ops mxs_auart_ops = { ...@@ -949,6 +959,7 @@ static struct uart_ops mxs_auart_ops = {
.startup = mxs_auart_startup, .startup = mxs_auart_startup,
.shutdown = mxs_auart_shutdown, .shutdown = mxs_auart_shutdown,
.set_termios = mxs_auart_settermios, .set_termios = mxs_auart_settermios,
.set_ldisc = mxs_auart_set_ldisc,
.type = mxs_auart_type, .type = mxs_auart_type,
.release_port = mxs_auart_release_port, .release_port = mxs_auart_release_port,
.request_port = mxs_auart_request_port, .request_port = mxs_auart_request_port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment