serial: atmel: Unable to set zero RTS after send delay for RS485

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

 



Hello,

We have encountered a problem with the atmel serial driver when using RS485 mode. It is impossible to set zero rts_after_send delay using an ioctl. The ioctl is successful but the delay is not changed.

The atmel_serial driver check the delay_rts_after_send parameter and only writes the timeguard register if the value is greater than zero:
if ((rs485conf->delay_rts_after_send) > 0)
        UART_PUT_TTGR(port, rs485conf->delay_rts_after_send);

Therefore, if the value has been set to non-zero value by device-tree or earlier ioctl command, it is impossible to change it back to zero.

We are working with the SAMA5 series and for them the datasheet states that zero value is "The Transmitter Timeguard disabled". So just removing the if-clause and always writing the TTGR register fixes this issue.

Is there some reason this check has been implemented in the first place? (e.g. different behavior on other processors)

BR,
Sami Pietikäinen
Wapice Ltd
--
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