]> git.baikalelectronics.ru Git - kernel.git/commit
tty: imx serial: Implement support for reversing TX and RX polarity
authorGeorge Hilliard <ghilliard@kopismobile.com>
Wed, 26 Feb 2020 22:23:19 +0000 (16:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2020 12:26:26 +0000 (13:26 +0100)
commit34fa3562d65613d2a482379b9ac99730885b0785
tree36d9a03625ac300158de3fd19e5ee8cbda75b1ca
parentabbc0d269e109c3e1ae6452188085200a1deb5b3
tty: imx serial: Implement support for reversing TX and RX polarity

The peripheral has support for inverting its input and/or output
signals.  This is useful if the hardware flips polarity of the
peripheral's signal, such as swapped +/- pins on an RS-422 transceiver,
or an inverting level shifter.  Add support for these control registers
via the device tree binding.

As part of this change, make the writes of the various registers more
uniform by moving the UCR3 block up near the other registers' blocks,
since the INVT bit must be set before enabling the peripheral.

Signed-off-by: George Hilliard <ghilliard@kopismobile.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20200226222319.18383-3-ghilliard@kopismobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c