Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbbFHGl3 (ORCPT ); Mon, 8 Jun 2015 02:41:29 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:37162 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbbFHGlV (ORCPT ); Mon, 8 Jun 2015 02:41:21 -0400 Date: Mon, 8 Jun 2015 08:41:13 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Bhuvanchandra DV Cc: gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, moorray3@wp.pl, linux-kernel@vger.kernel.org, stefan@agner.ch, bhuvanchandra.dv@gmail.com, kernel@pengutronix.de, shawn.guo@linaro.org, jslaby@suse.cz, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl Message-ID: <20150608064113.GX18985@pengutronix.de> References: <1433136067-20644-1-git-send-email-bhuvanchandra.dv@toradex.com> <1433136067-20644-3-git-send-email-bhuvanchandra.dv@toradex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1433136067-20644-3-git-send-email-bhuvanchandra.dv@toradex.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2081 Lines: 54 Hello, On Mon, Jun 01, 2015 at 10:51:06AM +0530, Bhuvanchandra DV wrote: > The LPUART does not provide manual control of RTS/CTS signals, > those can only be controlled by the hardware directly. Therefore > manual control of those signals through mctrl can not be provided. > The current implementation enables/disables the automatic control, > which is not what mctrl should do, hence remove the incorrect > implementation. > > Signed-off-by: Bhuvanchandra DV > --- > drivers/tty/serial/fsl_lpuart.c | 63 +++++------------------------------------ > 1 file changed, 7 insertions(+), 56 deletions(-) > > diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c > index 08ce76f..532cfb7 100644 > --- a/drivers/tty/serial/fsl_lpuart.c > +++ b/drivers/tty/serial/fsl_lpuart.c > @@ -822,64 +822,15 @@ static unsigned int lpuart32_tx_empty(struct uart_port *port) > > static unsigned int lpuart_get_mctrl(struct uart_port *port) > { > - unsigned int temp = 0; > - unsigned char reg; > - > - reg = readb(port->membase + UARTMODEM); > - if (reg & UARTMODEM_TXCTSE) > - temp |= TIOCM_CTS; > - > - if (reg & UARTMODEM_RXRTSE) > - temp |= TIOCM_RTS; > - > - return temp; >From reading the commit log I would expect that you only touch the set_mctrl function, but not get_mctrl. Assuming your code change is right, can you mention this in the commit log please? The bits UARTMODEM_TXCTSE and UARTMODEM_RXRTSE only control the automatic mode? What is the problem you're fixing here? I'm not sure how such an UART should be handled, but I imagine that you want to make use of automatic mode in some cases. Greg? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/