Commit fdbc7353 authored by Enric Balletbo i Serra's avatar Enric Balletbo i Serra Committed by Greg Kroah-Hartman

serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR

Some systems require the additional communication functionality of a
9-bit UART. For that we could use the "stick" (mark/space) parity
bit supported on omap serial device. When is set, if PARODD is set the
parity bit is always 1; if PARODD is not set, then the parity bit is
always 0.
Signed-off-by: default avatarEnric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6b68a69
...@@ -776,6 +776,8 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -776,6 +776,8 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
cval |= UART_LCR_PARITY; cval |= UART_LCR_PARITY;
if (!(termios->c_cflag & PARODD)) if (!(termios->c_cflag & PARODD))
cval |= UART_LCR_EPAR; cval |= UART_LCR_EPAR;
if (termios->c_cflag & CMSPAR)
cval |= UART_LCR_SPAR;
/* /*
* Ask the core to calculate the divisor for us. * Ask the core to calculate the divisor for us.
......
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