Re: [PATCH/RFC] 8250: Auto RS485 direction control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 04 August 2008, Grant Edwards wrote:
> On 2008-08-04, Laurent Pinchart <laurentp@xxxxxxxxxxxxxxxxx> 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: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux