Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: weo@reccoware.de (Wolfgang Ocker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: mxs-auart: support CMSPAR termios cflag
Date: Tue, 06 Dec 2016 16:54:04 +0100	[thread overview]
Message-ID: <1481039644.3856.3.camel@reccoware.de> (raw)
In-Reply-To: <546f7a46-df39-778f-e148-75862f426ff2@i2se.com>

On Tue, 2016-12-06 at 14:36 +0100, Stefan Wahren wrote:
> Hi Wolfgang,
> 
> > --- a/drivers/tty/serial/mxs-auart.c
> > +++ b/drivers/tty/serial/mxs-auart.c
> > @@ -95,6 +95,7 @@
> > ?#define AUART_LINECTRL_BAUD_DIVFRAC_SHIFT	8
> > ?#define AUART_LINECTRL_BAUD_DIVFRAC_MASK	0x00003f00
> > ?#define AUART_LINECTRL_BAUD_DIVFRAC(v)		(((v) & 0x3f) << 8)
> > +#define AUART_LINECTRL_SPS			(1 << 7)
> > ?#define AUART_LINECTRL_WLEN_MASK		0x00000060
> > ?#define AUART_LINECTRL_WLEN(v)			(((v) & 0x3) << 5)
> > ?#define AUART_LINECTRL_FEN			(1 << 4)
> > @@ -1010,10 +1011,12 @@ static void mxs_auart_settermios(struct uart_port
> > *u,
> > 	ctrl |= AUART_LINECTRL_WLEN(bm);
> > 
> > 	/* parity */
> > -	if (cflag & PARENB) {
> > +	if (cflag & (PARENB|CMSPAR)) {
> 
> does it make sense to enable stick parity in case parity is disabled?
> 
> The i.MX28 reference manual doesn't describe this case explicit.

Thanks Stefan for the hint. I think it's okay on the hardware side since the
PEN bit is always set and therefore it can not happen that SPS is set but not
PEN.

But on the termios side it makes sense to require PARENB to be set in c_cflag
if CMSPAR is requested.

So I will provide an updated patch soon.

Wolfgang

  reply	other threads:[~2016-12-06 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 13:36 [PATCH] serial: mxs-auart: support CMSPAR termios cflag Stefan Wahren
2016-12-06 15:54 ` Wolfgang Ocker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-12  7:21 Wolfgang Ocker
2017-01-03  9:24 ` Stefan Wahren
2016-11-30 10:16 Wolfgang Ocker

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=1481039644.3856.3.camel@reccoware.de \
    --to=weo@reccoware.de \
    --cc=linux-arm-kernel@lists.infradead.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