lkml.org 
[lkml]   [2010]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] U6715 16550A serial driver support
> In 16550A auto-configuration, if the fifo size is 64 then it's an U6 16550A port

That may not be reliable given the other 8250 clones around but looks
generally sane.


> @@ -2238,6 +2254,10 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
> unsigned long flags;
> unsigned int baud, quot;
>
> + /* Possibly call pre_set_termios function. */
> + if (port->pre_set_termios)
> + port->pre_set_termios(port, termios, old);
> +

Ok I think it might be better to have

serial8250_do_set_termios(...)
{
/* Existing set_termios code here */
}
EXPORT_SYMBOL(serial8250_do_set_termios);
serial8250_set_termios(...)
{
if (port->set_termios)
return port->set_termios(...)
else
serial8250_do_set_termions(...)
}
That allows people to wrap it with before/after/both handling, or replace
it entirely.

So in your case it would

my_set_termios()
{
/* pre set termios code here */
return serial8250_do_set_termios();
}

Looks ok to me though - it splits the special bits out from the core
nicely


\
 
 \ /
  Last update: 2010-07-29 15:43    [from the cache]
©2003-2011 Jasper Spaans