diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2016-03-24 14:24:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 09:26:55 -0700 |
commit | e881d3f3fafc849356ecd1e3a2f3bf669476ed2d (patch) | |
tree | 784054e9e646eae5e14b15b222a5cbf3d4b2e091 /drivers/tty/serial/imx.c | |
parent | 06ed48b7ee0c1b3c1dee6f2c90333109cf7db6ac (diff) |
serial: imx: fix polarity of RI
When in DTE mode, the bit USR2_RIIN is active low. So invert the logic
accordingly.
Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r-- | drivers/tty/serial/imx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 66cc3d198dcf..7cfb482bbc5c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -800,9 +800,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport) if (!(usr1 & USR2_DCDIN)) tmp |= TIOCM_CAR; - /* in DCE mode RIIN is always 0 */ - if (readl(sport->port.membase + USR2) & USR2_RIIN) - tmp |= TIOCM_RI; + if (sport->dte_mode) + if (!(readl(sport->port.membase + USR2) & USR2_RIIN)) + tmp |= TIOCM_RI; return tmp; } |