Re: [PATCH v7] serial: support for 16550A serial ports on LP-8x4x

From: One Thousand Gnomes
Date: Tue Mar 01 2016 - 14:54:37 EST


> > Maybe this flow will work for you
> >
> > if (BOTHER)
> > Âclear BOTHER
> > ÂcallÂuart_get_baud_rate()
> >
> > ?
>
> It works well for standard rates, let it be so. If there ever is a
> problem, we can fix it.

I'm NAKking the v7 PATCH because we spent ages getting all the drivers to
use tty_termios_get_baud_rate() cleanly.

Get rid of everything in the ifdef BOTHER
Remove the if baud > 115200 stuff

For the default: entry in the case add

tty_termios_encode_baud_rate(termios, 2400, 2400);

and all will be good. Anything not a standard rate will get 2400 baud and
reported back to the user properly as that rate.

You could do matches for "within 10%" but really I don't think it matters
and other drivers don't bother either when they have such fixed clocks.

Alan