lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl
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 <bhuvanchandra.dv@toradex.com>
>> ---
>> 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


\
 
 \ /
  Last update: 2015-06-08 09:41    [W:0.085 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site