From: Alan Cox <alan@linux.intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
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: Wed, 21 Dec 2011 20:28:47 +0000 [thread overview]
Message-ID: <20111221202847.4ffeba10@bob.linux.org.uk> (raw)
In-Reply-To: <1324479959-7343-1-git-send-email-u.kleine-koenig@pengutronix.de>
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)
> +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)
> +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.
> + /* 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.
> + 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.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-12-21 20:16 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 [this message]
2011-12-22 8:57 ` Uwe Kleine-König
[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=20111221202847.4ffeba10@bob.linux.org.uk \
--to=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 \
--cc=u.kleine-koenig@pengutronix.de \
/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).