Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbFHH0W (ORCPT ); Mon, 8 Jun 2015 03:26:22 -0400 Received: from mail-am1on0116.outbound.protection.outlook.com ([157.56.112.116]:50560 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751989AbbFHH0N (ORCPT ); Mon, 8 Jun 2015 03:26:13 -0400 Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none; Message-ID: <55754379.90804@toradex.com> Date: Mon, 8 Jun 2015 12:55:45 +0530 From: Bhuvanchandra DV User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: =?windows-1252?Q?Uwe_Kleine-K=F6nig?= CC: , , , , , , , , , , Subject: Re: [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl References: <1433136067-20644-1-git-send-email-bhuvanchandra.dv@toradex.com> <1433136067-20644-3-git-send-email-bhuvanchandra.dv@toradex.com> <20150608064113.GX18985@pengutronix.de> In-Reply-To: <20150608064113.GX18985@pengutronix.de> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [115.115.225.206] X-ClientProxiedBy: HKXPR03CA0050.apcprd03.prod.outlook.com (10.141.129.40) To DB3PR05MB267.eurprd05.prod.outlook.com (10.141.4.26) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR05MB267; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:DB3PR05MB267;BCL:0;PCL:0;RULEID:;SRVR:DB3PR05MB267; X-Forefront-PRVS: 060166847D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(479174004)(51704005)(24454002)(377454003)(46102003)(92566002)(122386002)(50466002)(4001350100001)(40100003)(19580395003)(5001960100002)(2950100001)(19580405001)(65816999)(110136002)(54356999)(189998001)(76176999)(23746002)(50986999)(77096005)(77156002)(62966003)(66066001)(65956001)(86362001)(117636001)(36756003)(65806001)(47776003)(83506001)(42186005)(62816006);DIR:OUT;SFP:1102;SCL:1;SRVR:DB3PR05MB267;H:[10.18.0.154];FPR:;SPF:None;MLV:sfv;LANG:en; X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2015 07:26:05.9244 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR05MB267 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2344 Lines: 61 Hello, On 06/08/2015 12:11 PM, Uwe Kleine-K?nig wrote: > 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? OK, will use 'get/set_mctrl' instead of 'mctrl' in the commit log. Yes, those bits are only responsible for enabling/disabling the auto hardware flow control, not for controlling the RTS/CTS signals directly. > > 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? > Fixing the implementation of hardware flow control wrt LPUART hardware. > Best regards > Uwe > Best regards, Bhuvan -- 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/