diff options
author | Wolfgang Ocker <weo@reccoware.de> | 2016-12-12 08:21:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 11:51:24 +0100 |
commit | f87fa71e6fb0fa7bade9c3f3bb3f49325e76a90a (patch) | |
tree | 256e0f5e83f7f3f1e7974561167ebd8cede905ad /drivers/tty | |
parent | serial: max310x: Add support for newer silicon revisions (diff) | |
download | linux-f87fa71e6fb0fa7bade9c3f3bb3f49325e76a90a.tar.xz linux-f87fa71e6fb0fa7bade9c3f3bb3f49325e76a90a.zip |
serial: mxs-auart: support CMSPAR termios cflag
If CMSPAR is set in the c_cflag of termios, "stick" parity is enabled.
Tested on an i.MX28 system
Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 8c1c9112b3fd..6989b227d134 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -95,6 +95,7 @@ #define AUART_LINECTRL_BAUD_DIVFRAC_SHIFT 8 #define AUART_LINECTRL_BAUD_DIVFRAC_MASK 0x00003f00 #define AUART_LINECTRL_BAUD_DIVFRAC(v) (((v) & 0x3f) << 8) +#define AUART_LINECTRL_SPS (1 << 7) #define AUART_LINECTRL_WLEN_MASK 0x00000060 #define AUART_LINECTRL_WLEN(v) (((v) & 0x3) << 5) #define AUART_LINECTRL_FEN (1 << 4) @@ -1014,6 +1015,8 @@ static void mxs_auart_settermios(struct uart_port *u, ctrl |= AUART_LINECTRL_PEN; if ((cflag & PARODD) == 0) ctrl |= AUART_LINECTRL_EPS; + if (cflag & CMSPAR) + ctrl |= AUART_LINECTRL_SPS; } u->read_status_mask = AUART_STAT_OERR; |