mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Philippe Langlais <philippe.langlais@stericsson.com>
Cc: <linux-kernel@vger.kernel.org>, <gregkh@suse.de>,
	<ludovic.barre@stericsson.com>, <vincent.guittot@stericsson.com>
Subject: Re: [PATCH] U6715 16550A serial driver support
Date: Thu, 29 Jul 2010 14:53:35 +0100	[thread overview]
Message-ID: <20100729145335.16cea2dc@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1280410348-28940-2-git-send-email-philippe.langlais@stericsson.com>

> 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

  reply	other threads:[~2010-07-29 13:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 13:32 New U6715 8250 serial patch Philippe Langlais
2010-07-29 13:32 ` [PATCH] U6715 16550A serial driver support Philippe Langlais
2010-07-29 13:53   ` Alan Cox [this message]
2010-07-29 15:13 Philippe Langlais
2010-07-29 15:31 ` Alan Cox
2010-08-02  8:58 Philippe Langlais
2010-08-04 19:52 ` Andrew Morton
2010-08-05  7:14   ` Philippe Langlais
2010-08-05  7:22     ` Andrew Morton
2010-08-05  8:51       ` Philippe Langlais
2010-08-05  9:00         ` Andrew Morton
2010-08-05 23:04       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100729145335.16cea2dc@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.barre@stericsson.com \
    --cc=philippe.langlais@stericsson.com \
    --cc=vincent.guittot@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®