Skip to contentSkip to conversation

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

PATCH New Enric Balletbo i Serra 1 participant 1 message Dec 6, 2012 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

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

From: Enric Balletbo i Serra <[email protected]>

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.

---
 drivers/tty/serial/omap-serial.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/omap-serial.c +2 -0
index 6d3d26a..197fb71 100644
@@ -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.
Signature · 1 line
1.7.10.4