mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
serial amba-pl010: enable PPS support
Function pl010_enable_ms() is automagically called when PPS ldisc is selected. Signed-off-by: Rodolfo Giometti <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Greg KH <[email protected]> Cc: Alan Cox <[email protected]> Cc: Alexander Gordeev <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dc77f161aa
commit
7ed63d5eb4
1 changed files with 15 additions and 0 deletions
|
|
@ -471,6 +471,20 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
spin_unlock_irqrestore(&uap->port.lock, flags);
|
||||
}
|
||||
|
||||
static void pl010_set_ldisc(struct uart_port *port)
|
||||
{
|
||||
int line = port->line;
|
||||
|
||||
if (line >= port->state->port.tty->driver->num)
|
||||
return;
|
||||
|
||||
if (port->state->port.tty->ldisc->ops->num == N_PPS) {
|
||||
port->flags |= UPF_HARDPPS_CD;
|
||||
pl010_enable_ms(port);
|
||||
} else
|
||||
port->flags &= ~UPF_HARDPPS_CD;
|
||||
}
|
||||
|
||||
static const char *pl010_type(struct uart_port *port)
|
||||
{
|
||||
return port->type == PORT_AMBA ? "AMBA" : NULL;
|
||||
|
|
@ -531,6 +545,7 @@ static struct uart_ops amba_pl010_pops = {
|
|||
.startup = pl010_startup,
|
||||
.shutdown = pl010_shutdown,
|
||||
.set_termios = pl010_set_termios,
|
||||
.set_ldisc = pl010_set_ldisc,
|
||||
.type = pl010_type,
|
||||
.release_port = pl010_release_port,
|
||||
.request_port = pl010_request_port,
|
||||
|
|
|
|||
Loading…
Reference in a new issue