public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Eric Tremblay <etremblay@distech-controls.com>
Cc: gregkh@linuxfoundation.org, jslaby@suse.com,
	matwey.kornilov@gmail.com, giulio.benetti@micronovasrl.com,
	lukas@wunner.de, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	christoph.muellner@theobroma-systems.com, heiko@sntech.de,
	heiko.stuebner@theobroma-systems.com
Subject: Re: [PATCH v2 1/3] serial: 8250: Handle UART without interrupt on TEMT using em485
Date: Fri, 1 Oct 2021 14:48:42 +0300	[thread overview]
Message-ID: <YVb1mvhDgbw7Oofz@smile.fi.intel.com> (raw)
In-Reply-To: <20210204161158.643-2-etremblay@distech-controls.com>

On Thu, Feb 04, 2021 at 11:11:56AM -0500, Eric Tremblay wrote:
> The patch introduce the UART_CAP_NOTEMT capability. The capability

s/The patch//

> indicate that the UART doesn't have an interrupt available on TEMT.

indicates

> In the case where the device does not support it, we calculate the
> maximum time it could take for the transmitter to empty the
> shift register. When we get in the situation where we get the
> THRE interrupt, we check if the TEMT bit is set. If it's not, we start
> the a timer and recall __stop_tx() after the delay.
> 
> The transmit sequence is a bit modified when the capability is set. The
> new timer is used between the last interrupt(THRE) and a potential
> stop_tx timer.

> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> [moved to use added UART_CAP_TEMT]
> Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
> [moved to use added UART_CAP_NOTEMT, improve timeout]
> Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>

Does it need Co-developed-by tag(s)?

...

> +#define UART_CAP_NOTEMT	(1 << 18)	/* UART without interrupt on TEMT available*/

Missed space in the comment .

...

> +static inline void serial8250_em485_update_temt_delay(struct uart_8250_port *p,
> +			unsigned int cflag, unsigned int baud)
> +{
> +	unsigned int bits;
> +
> +	if (!p->em485)
> +		return;
> +
> +	bits = uart_get_byte_size(cflag);

Should be rebased. We have tty_get_frame_size() for a while.

> +	p->em485->no_temt_delay = bits * NSEC_PER_SEC / baud;
> +}

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2021-10-01 11:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 16:11 [PATCH v2 0/3] Handle UART without interrupt on TEMT using em485 Eric Tremblay
2021-02-04 16:11 ` [PATCH v2 1/3] serial: 8250: " Eric Tremblay
2021-02-04 21:36   ` kernel test robot
2021-10-01 12:30     ` Uwe Kleine-König
2021-10-01 13:05       ` Andy Shevchenko
2021-10-01 11:48   ` Andy Shevchenko [this message]
2021-10-04  9:45   ` Uwe Kleine-König
2021-02-04 16:11 ` [PATCH v2 2/3] serial: 8250: Add UART_CAP_NOTEMT on PORT_16550A_FSL64 Eric Tremblay
2021-10-01 11:50   ` Andy Shevchenko
2021-02-04 16:11 ` [PATCH v2 3/3] serial: 8250: add compatible for fsl,16550-FIFO64 Eric Tremblay
2021-10-01 11:50   ` Andy Shevchenko
2021-02-05 14:20 ` [PATCH v2 0/3] Handle UART without interrupt on TEMT using em485 Andy Shevchenko
2021-09-29 20:07   ` Uwe Kleine-König
2021-10-01 11:40     ` Andy Shevchenko

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=YVb1mvhDgbw7Oofz@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=etremblay@distech-controls.com \
    --cc=giulio.benetti@micronovasrl.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.stuebner@theobroma-systems.com \
    --cc=heiko@sntech.de \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=matwey.kornilov@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox