public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: Grant Edwards <grante@visi.com>
Cc: linux-serial@vger.kernel.org, Russell King <rmk@arm.linux.org.uk>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH/RFC] 8250: Auto RS485 direction control
Date: Tue, 5 Aug 2008 11:41:04 +0200	[thread overview]
Message-ID: <200808051141.07707.laurentp@cse-semaphore.com> (raw)
In-Reply-To: <g779ul$7ih$1@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]

On Monday 04 August 2008, Grant Edwards wrote:
> On 2008-08-04, Laurent Pinchart <laurentp@cse-semaphore.com> wrote:
> > On Monday 04 August 2008, Tosoni wrote:
> >> About the flags names -- CARTS, UART_FCTR_RS485
> >> 
> >> May I suggest CRTSTOGGLE since it is known by that kind of name in other
> >> OS's :-)
> >
> > I like Russell's proposal of sticking to CRTSCTS and adding options to
> > setserial:
> >
> >> Should CRTSCTS be a global "enable some kind of flow control" bit and
> >> setserial be used to configure the actual flow control method
> >> (conventional RTS/CTS, DTR/DSR, alternate RTS/CTS, RS485 on RTS,
> >> RS485 on DTR) ?
> >
> > Any opinion on that ?
> 
> Opposed.
> 
>  1) CRTSCTS means something quite specific.

That's right, and this is my main concern.

>     Rather than overload that name for something unrelated, create a new
>     mode bit for the new mode.

We already have 3 distinct modes for RTS/CTS (see my mail from today 11:23:36 in this thread). If we add DSR/DTR hardware support we can easily get 5 or 6 modes. We will run out of bits in c_cflags.

>  2) Most of what's in setserial is useless and irrelevent to
>     non-PC-motherboard-16550-uart serial ports (the drivers for
>     which often don't support setserial).
> 
> Let's just suck it up and do it the right way.

As the number of bits in c_cflags is not infinite we will need an ioctl to configure the desired hardware handshake mode (as most modes don't control the data flow I'd rather talk about hardware handshake which is a more generic name). We can either use one of the struct serial_struct reserved fields with TIOCSSERIAL, or create another ioctl.

> >> And further, it says was RTS will do, instead of why. Maybe
> >> someone could use it for something other than RS485 ?
> >
> > I agree with you here. The name should reflect that RTS is
> > used in 'envelope' mode (asserted during data transmission,
> > idle between frames).
> 
> I don't really care what the name is.  "RTS toggle" or
> "half-duplex" is what everybody I know calls it.

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2008-08-05  9:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 11:47 [PATCH/RFC] 8250: Auto RS485 direction control Laurent Pinchart
2008-07-24 11:57 ` Alan Cox
2008-07-24 12:24   ` Russell King
2008-07-24 12:27     ` Alan Cox
2008-07-24 12:52       ` Russell King
2008-07-24 13:00         ` Alan Cox
2008-07-24 13:18         ` Laurent Pinchart
2008-07-24 14:13         ` Matt Schulte
2008-07-24 14:47           ` Russell King
2008-07-24 12:10 ` Russell King
2008-08-04 14:14 ` Tosoni
2008-08-04 14:22   ` Grant Edwards
2008-08-04 14:36   ` Laurent Pinchart
2008-08-04 16:15     ` Grant Edwards
2008-08-04 16:21       ` Grant Edwards
2008-08-05  9:41       ` Laurent Pinchart [this message]
2008-08-05 12:55         ` Tosoni
2008-08-06 14:30           ` Christopher Gibson
2008-08-06 16:33             ` Tosoni
2008-08-09 10:08               ` Christopher Gibson
2008-08-07  8:50             ` Laurent Pinchart
2008-08-07 13:50               ` Grant Edwards
2008-08-10  3:49               ` Christopher Gibson
2008-08-10  3:57               ` Christopher Gibson
2008-08-29 12:22                 ` Christopher Gibson
2008-12-02 13:09                 ` [PATCH/RFC] " Christopher Gibson
2008-12-04 11:14                   ` Christopher Gibson
2008-08-04 16:47     ` [PATCH/RFC] 8250: " Tosoni
2008-08-04 17:46       ` Grant Edwards
2008-08-04 20:59         ` Matt Schulte
2008-08-05  9:23         ` Laurent Pinchart
2008-08-05  9:34         ` Tosoni

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=200808051141.07707.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=grante@visi.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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