RE: Handling RTS

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

 



linux-serial-owner@xxxxxxxxxxxxxxx escribió el 24/01/2008 14:42:14:

Thank you very munch for your response Jean-Pierre. I think you understand 
me.

> It has been known since long ago that this behaviour (which is required 
to
> properly handle many RS485 devices) is not implemented by the serial 
driver.
> 
> So yes, you will have to implement it.
> There are several ways to do it, by creating a new line discipline as
> suggested by Russell King, or a new termios behaviour, or a new serial
> ioctl.


Yes, but, I am confused.  A line discipline is oriented to translate data 
not to handle flow control protocol , isn't It? 


> 
> In any case you will also need to add support for this in the 8250 
driver
> itself. You can do this
>  - by using special features of 82950 uarts (I did this once),
>  - or by implementing RTS toggleing in software, which
>     (1) is more difficult because there is no UART interrupt
>         at the end of the byte serialization process,
>     (2) is more flexible because you may want to handle a
>         configurable delay between RTS rise/data/RTS fall,
>     (3) is the only way with the 16C550 and earlier devices.
> 

Yes, but it's only for 8250 uart. I think that all uarts have RTS pin. I 
know it's not true, but

For example this code snipet from serial_core.c

static void __uart_start(struct tty_struct *tty)
{
        struct uart_state *state = tty->driver_data;
        struct uart_port *port = state->port;

        if (!uart_circ_empty(&state->info->xmit) && state->info->xmit.buf 
&&
            !tty->stopped && !tty->hw_stopped)
                port->ops->start_tx(port);
}

is it posible activate RTS just before start_tx() call using 
uart_update_mctrl() function?

This shall be used by all uarts, isn't it?

Is it posible implement RTS handling on serial_core.c module to be common 
to all uarts?

Thanks in avance








José Luis Zabalza

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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