[LinuxPPS] [PATCH 07/11] serial 8250: enable PPS support.
Rodolfo Giometti
giometti at linux.it
Wed Sep 16 23:16:54 CEST 2009
Automagically function serial8250_enable_ms() is called when PPS ldisc
is selected.
Signed-off-by: Rodolfo Giometti <giometti at linux.it>
---
drivers/serial/8250.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index fb867a9..4d7d9b1 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2411,6 +2411,18 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
}
static void
+serial8250_set_ldisc(struct uart_port *port)
+{
+ int line = port->line;
+
+ if (line >= port->info->port.tty->driver->num)
+ return;
+
+ if (port->info->port.tty->ldisc->ops->num == N_PPS)
+ serial8250_enable_ms(port);
+}
+
+static void
serial8250_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate)
{
@@ -2624,6 +2636,7 @@ static struct uart_ops serial8250_pops = {
.startup = serial8250_startup,
.shutdown = serial8250_shutdown,
.set_termios = serial8250_set_termios,
+ .set_ldisc = serial8250_set_ldisc,
.pm = serial8250_pm,
.type = serial8250_type,
.release_port = serial8250_release_port,
--
1.6.0.4
More information about the LinuxPPS
mailing list