From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbcLFP4t (ORCPT ); Tue, 6 Dec 2016 10:56:49 -0500 Received: from schu.reccoware.net ([87.106.213.85]:41193 "EHLO schu.reccoware.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbcLFP4s (ORCPT ); Tue, 6 Dec 2016 10:56:48 -0500 Message-ID: <1481039644.3856.3.camel@reccoware.de> Subject: Re: [PATCH] serial: mxs-auart: support CMSPAR termios cflag From: Wolfgang Ocker To: Stefan Wahren Cc: Fabio Estevam , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Date: Tue, 06 Dec 2016 16:54:04 +0100 In-Reply-To: <546f7a46-df39-778f-e148-75862f426ff2@i2se.com> References: <546f7a46-df39-778f-e148-75862f426ff2@i2se.com> Organization: Reccoware Systems Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.2 (3.22.2-1.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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