public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Tosoni" <jp.tosoni@acksys.fr>
To: 'Laurent Pinchart' <laurentp@cse-semaphore.com>,
	'Grant Edwards' <grante@visi.com>
Cc: linux-serial@vger.kernel.org
Subject: RE: [PATCH/RFC] 8250: Auto RS485 direction control
Date: Tue, 5 Aug 2008 14:55:42 +0200	[thread overview]
Message-ID: <002101c8f6fa$9273ab10$2e01a8c0@acksys.local> (raw)
In-Reply-To: <200808051141.07707.laurentp@cse-semaphore.com>

> -----Original Message-----
> From: Laurent Pinchart
>
> On Monday 04 August 2008, Grant Edwards wrote:
> > On 2008-08-04, Laurent Pinchart <laurentp@cse-semaphore.com> wrote:

(...)

> 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.
>
The three modes which you identify are
(A) bus direction
(B) send data request (well... RTS=Request To Send :-)) which should be
acknowledged by CTS
(C) input flow control
but, the RTS is widely used for (A)=bus direction BECAUSE it is the same
behaviour than (B)=request to send... because RTS was initially made to set
the "bus direction" in the attached modem.
So the three modes are really 2.

People require the (A+B) usage because is in the RS232 and also in V24
specs. But DTR+DSR handshake, really, it's not standardized in any way nor
in broad use. I don't think this is a real need (my personal opinion). My
company once had a card implementing DTR/DSR flow control, nobody used it
and it has been dropped from newer cards.
If we really want it we could resort to a setserial flag to say "RTS/CTS
flow is implemented with DTR/DSR", but then, why not swapping the pin
cabling on the connector then ?

My conclusion: only one bit is needed in c_cflags.
BUT: think of all the upper APIs (termio, termios, tcset/get... and people
using directly TCSET/TCGET ioctls. I am afraid that changing a single bit in
such a widely used API might break a lot of existing apps.

(...)
>
> 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.
>
In the Linux CRIS architecture I've seen an IOCTL doing exactly this, with
extra parameters to set the delays RTS-to-Tx and /Tx-to-/RTS. It sounds like
a non intrusive way of adding the feature.

This would definitely be my preferred way of doing (it's the one which I use
in my 16C950 driver).

JP Tosoni


  reply	other threads:[~2008-08-05 12:57 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
2008-08-05 12:55         ` Tosoni [this message]
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='002101c8f6fa$9273ab10$2e01a8c0@acksys.local' \
    --to=jp.tosoni@acksys.fr \
    --cc=grante@visi.com \
    --cc=laurentp@cse-semaphore.com \
    --cc=linux-serial@vger.kernel.org \
    /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