* [PATCH] serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR
@ 2012-12-06 8:45 Enric Balletbo i Serra
0 siblings, 0 replies; only message in thread
From: Enric Balletbo i Serra @ 2012-12-06 8:45 UTC (permalink / raw)
To: Alan Cox, Greg Kroah-Hartman, linux-serial, linux-omap
Cc: Enric Balletbo i Serra
From: Enric Balletbo i Serra <eballetbo@iseebcn.com>
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: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
drivers/tty/serial/omap-serial.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 6d3d26a..197fb71 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -756,6 +756,8 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
cval |= UART_LCR_PARITY;
if (!(termios->c_cflag & PARODD))
cval |= UART_LCR_EPAR;
+ if (termios->c_cflag & CMSPAR)
+ cval |= UART_LCR_SPAR;
/*
* Ask the core to calculate the divisor for us.
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-06 8:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 8:45 [PATCH] serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR Enric Balletbo i Serra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).