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: "gregkh@suse.de" <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ludovic BARRE <ludovic.barre@stericsson.com>,
	Vincent Guittot <vincent.guittot@stericsson.com>
Subject: Re: patch "U6715 8250 serial like driver" added to gregkh-2.6 tree
Date: Tue, 27 Jul 2010 09:14:08 +0100	[thread overview]
Message-ID: <20100727091408.49d55447@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <4C4E9064.6070001@stericsson.com>

> > I think what you need to keep this clean is to create a
> > port->set_termios() for the 8250 port (akin to
> > port->serial_in/serial_out) which does the specials you need each end and
> > calls the standard serial8250_set_termios)
> >    
> I don't think so, call a function which compute clock each time
> we access UART registers isn't optimal, another function to overload ?

set_termios() gets called once at init time and once each time a
caller requests a change in serial parameters. That's not usually
considered a hot path. I'm not suggesting you hide it in the register
methods but add ->set_termios as a method that can be overridden, plus
export the existing one so you can wrap it.

If you can't detect the chip then create yourself a u6715 driver file
which registers the ports you have and specifies the relevant
serial_in/out methods and other detail as well as containing the board
specific routines needed.

See arch/arm/mach-omap2/serial.c for a ARM example doing this, where all
the chip knowledge is nicely buried away in the platform support.

  reply	other threads:[~2010-07-27  8:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19  9:27 [PATCH] U6715 8250 serial like driver Philippe Langlais
2010-07-22 23:57 ` patch "U6715 8250 serial like driver" added to gregkh-2.6 tree gregkh
2010-07-23  8:01   ` Alan Cox
2010-07-23 12:37     ` Greg KH
2010-07-27  7:53     ` Philippe Langlais
2010-07-27  8:14       ` Alan Cox [this message]
2010-07-27 14:46         ` Philippe Langlais
2010-07-27 15:05           ` Alan Cox
2010-07-27 15:01             ` Philippe Langlais

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=20100727091408.49d55447@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®