Re: [PATCH v2 3/4] usb: serial: implement function for F81232

From: Peter Hung
Date: Wed Jan 21 2015 - 22:38:41 EST


Hello,

I'll do it later depend on this series patchs to be accpeted or rejected.

Thanks for your advice

One Thousand Gnomes æ 2015/1/21 äå 10:41 åé:

+ 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/