serial: core: Support common rs485 binding for RTS polarity
authorLukas Wunner <lukas@wunner.de>
Fri, 24 Nov 2017 22:26:40 +0000 (23:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 15:05:19 +0000 (16:05 +0100)
commitf1e5b618c1c26cb8b5818e36f996e8c2fbedbeb7
treed75fec5220f2f86305a22a7c877cfe272d85309a
parent6abe9ea8a5a5904d935b8a482117a7fd9b25f09e
serial: core: Support common rs485 binding for RTS polarity

When a driver invokes the uart_get_rs485_mode() helper, set the RTS
polarity to active high by default unless the newly introduced
"rs485-rts-active-low" property was specified.

imx contains a line to set the default RTS polarity to active high,
it is now superfluous and hence deleted.

omap-serial historically defaults to active low and supports an
"rs485-rts-active-high" property to inverse the polarity.
Retain that behavior for compatibility.

Cc: Mark Jackson <mpfj@newflow.co.uk>
Cc: Michał Oleszczyk <oleszczyk.m@gmail.com>
Cc: Rafael Gago Castano <rgc@hms.se>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c
drivers/tty/serial/omap-serial.c
drivers/tty/serial/serial_core.c