--
+ if (cflag & PARENB) {
+ if (cflag & PARODD)
+ new_lcr |= UART_LCR_PARITY; /* odd */
+ else
+ new_lcr |= SERIAL_EVEN_PARITY; /* even */
+ }
If you don't support mark/space also clear CMSPAR in the passed termios
- if (old_termios)
- tty_termios_copy_hw(&tty->termios, old_termios);
Also when you set the baud rate compute the resulting actual baud rate
you generated and set it with
/* Don't rewrite B0 */
if (tty_termios_baud_rate(termios))
tty_termios_encode_baud_rate(termios, baud, baud);
so that the application gets told the baud rate it actually got if it
isn't close to the one they requested.
Alan