From: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
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
Date: Mon, 8 Jun 2015 12:55:45 +0530 [thread overview]
Message-ID: <55754379.90804@toradex.com> (raw)
In-Reply-To: <20150608064113.GX18985@pengutronix.de>
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
WARNING: multiple messages have this Message-ID (diff)
From: bhuvanchandra.dv@toradex.com (Bhuvanchandra DV)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl
Date: Mon, 8 Jun 2015 12:55:45 +0530 [thread overview]
Message-ID: <55754379.90804@toradex.com> (raw)
In-Reply-To: <20150608064113.GX18985@pengutronix.de>
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
WARNING: multiple messages have this Message-ID (diff)
From: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
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
Date: Mon, 8 Jun 2015 12:55:45 +0530 [thread overview]
Message-ID: <55754379.90804@toradex.com> (raw)
In-Reply-To: <20150608064113.GX18985@pengutronix.de>
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
next prev parent reply other threads:[~2015-06-08 7:25 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 5:21 [PATCH V2 0/3] Add RS-485 support and fix RTS/CTS implementation Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
[not found] ` <1433136067-20644-1-git-send-email-bhuvanchandra.dv-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org>
2015-06-01 5:21 ` [PATCH V2 1/3] ARM: dts: colibri-vf: Add pinmux for UART_0 aka UART_A RTS/CTS pins Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
2015-06-01 5:21 ` [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
[not found] ` <1433136067-20644-3-git-send-email-bhuvanchandra.dv-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org>
2015-06-08 6:41 ` Uwe Kleine-König
2015-06-08 6:41 ` Uwe Kleine-König
2015-06-08 6:41 ` Uwe Kleine-König
2015-06-08 7:25 ` Bhuvanchandra DV [this message]
2015-06-08 7:25 ` Bhuvanchandra DV
2015-06-08 7:25 ` Bhuvanchandra DV
[not found] ` <20150608064113.GX18985-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-06-08 9:14 ` Russell King - ARM Linux
2015-06-08 9:14 ` Russell King - ARM Linux
2015-06-08 9:14 ` Russell King - ARM Linux
2015-06-08 9:19 ` Russell King - ARM Linux
2015-06-08 9:19 ` Russell King - ARM Linux
2015-06-08 9:19 ` Russell King - ARM Linux
2015-06-08 9:12 ` Russell King - ARM Linux
2015-06-08 9:12 ` Russell King - ARM Linux
[not found] ` <20150608091244.GS7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-06-09 4:12 ` Bhuvanchandra DV
2015-06-09 4:12 ` Bhuvanchandra DV
2015-06-09 4:12 ` Bhuvanchandra DV
2015-06-08 5:58 ` [PATCH V2 0/3] Add RS-485 support and fix RTS/CTS implementation Bhuvanchandra DV
2015-06-08 5:58 ` Bhuvanchandra DV
2015-06-08 5:58 ` Bhuvanchandra DV
[not found] ` <55752EF5.1040103-2KBjVHiyJgBBDgjK7y7TUQ@public.gmane.org>
2015-06-13 0:35 ` Greg KH
2015-06-13 0:35 ` Greg KH
2015-06-13 0:35 ` Greg KH
2015-06-01 5:21 ` [PATCH V2 3/3] tty: serial: fsl_lpuart: Add support for RS-485 Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
2015-06-01 5:21 ` Bhuvanchandra DV
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=55754379.90804@toradex.com \
--to=bhuvanchandra.dv@toradex.com \
--cc=bhuvanchandra.dv@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=moorray3@wp.pl \
--cc=shawn.guo@linaro.org \
--cc=stefan@agner.ch \
--cc=u.kleine-koenig@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.