linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Alan Cox <alan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-serial@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] serial/efm32: add new driver
Date: Thu, 22 Dec 2011 09:57:06 +0100	[thread overview]
Message-ID: <20111222085706.GD24496@pengutronix.de> (raw)
In-Reply-To: <20111221202847.4ffeba10@bob.linux.org.uk>

Hello,

On Wed, Dec 21, 2011 at 08:28:47PM +0000, Alan Cox wrote:
> On Wed, 21 Dec 2011 16:05:59 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> > Hello,
> > 
> > note that ARCH_EFM32 isn't in mainline yet, so to be actually usable
> > some arch patches are needed.
> 
> Start by running it through the CodingStyle scripts as I see a //
> comment in there 8)
oops

> > +static void efm32_usart_rx_chars(struct efm32_usart_port *efm_port)
> > +{
> > +	struct uart_port *port = &efm_port->port;
> > +	struct tty_struct *tty = port->state->port.tty;
> 
> Needs to be using krefs and checking the tty is not NULL
> (tty_port_tty_get)
ah, I copied from mxs-auart. Will try to find a better example. 
 
> > +static void efm32_usart_set_termios(struct uart_port *port,
> > +		struct ktermios *new, struct ktermios *old)
> > +{
> > +	struct efm32_usart_port *efm_port = to_efm_port(port);
> > +	unsigned long flags;
> > +	unsigned baud;
> > +	u32 clkdiv;
> > +
> > +	/* no modem control lines */
> > +	new->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR);
> 
> Minor item - HUPCL shouldn't get cleared - its a request for hangup
> behaviour not a port feature.
ah, I copied that from imx (in an if(0) though).
 
> > +	/* currently only some features are implemented */
> > +	new->c_cflag &= ~CSIZE;
> > +	new->c_cflag |= CS8;
> > +	new->c_cflag |= CSTOPB;
> > +	new->c_cflag &= ~PARENB;
> 
> If you can do CS8 without parity you can do CS7 with parity.
I sticked to the things I use and tested. According to the manual the
hardware can do 4 up to 16 data bits with and without parity :-)
 
> > +	new->c_iflag = 0;
> 
> This seems broken. Lots of the iflgs are user requests and stack
> properties not port features. For example you can do xon/xoff as its
> pure software. As far as I can see you should leave c_iflag alone.
ok.

I will send an update and fix the drivers I copied from.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-12-22  8:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 15:05 [PATCH] serial/efm32: add new driver Uwe Kleine-König
2011-12-21 20:28 ` Alan Cox
2011-12-22  8:57   ` Uwe Kleine-König [this message]
     [not found]   ` <20111221202847.4ffeba10-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
2011-12-22 13:38     ` Uwe Kleine-König
2011-12-23 10:35       ` Arnd Bergmann
2011-12-23 20:44         ` Uwe Kleine-König
     [not found]           ` <20111223204428.GI24496-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09  9:59             ` Kconfig option for compile time build coverage (Was: Re: [PATCH] serial/efm32: add new driver) Uwe Kleine-König
2012-01-25 16:16               ` Arnd Bergmann
2012-01-09 10:34           ` [PATCH] serial/efm32: add new driver Uwe Kleine-König
2012-01-25 16:56             ` Arnd Bergmann
     [not found]       ` <1324561092-1945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09 16:44         ` [PATCH v3] " Uwe Kleine-König
2012-01-24 22:05           ` Greg KH
2012-01-25  8:05             ` [PATCH v4] " Uwe Kleine-König
2012-01-25  8:25               ` Joe Perches
2012-01-25  8:41                 ` Uwe Kleine-König
2012-01-25 15:52               ` Greg KH
2012-01-25 18:36                 ` Uwe Kleine-König

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=20111222085706.GD24496@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alan@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gregkh@suse.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).