tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send
authorNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 11 May 2015 11:00:31 +0000 (13:00 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 12 Aug 2015 14:33:12 +0000 (16:33 +0200)
commitf312564391d123f530d30ea4d1d9431dd7f5a6dc
tree24ee7e726e40f86a6cf1ba5f70231b157f509908
parent7acdcce017318585ddb3eacd1d04610b62f181a5
tty/serial: at91: RS485 mode: 0 is valid for delay_rts_after_send

commit 8687634b7908c42eb700e0469e110e02833611d1 upstream.

In RS485 mode, we may want to set the delay_rts_after_send value to 0.
In the datasheet, the 0 value is said to "disable" the Transmitter Timeguard but
this is exactly the expected behavior if we want no delay...

Moreover, if the value was set to non-zero value by device-tree or earlier
ioctl command, it was impossible to change it back to zero.

Reported-by: Sami Pietikäinen <Sami.Pietikainen@wapice.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/serial/atmel_serial.c