Commit 6dd81b45 authored by Frank Schaefer's avatar Frank Schaefer Committed by Greg Kroah-Hartman
Browse files

USB-serial: pl2303: add space/mark parity



The device supports it, so why not use it ? Works fine !

Signed-off-by: default avatarFrank Schaefer <schaefer.frank@gmx.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 25b82868
......@@ -636,11 +636,21 @@ static void pl2303_set_termios(struct tty_struct *tty,
/* For reference buf[5]=3 is mark parity */
/* For reference buf[5]=4 is space parity */
if (cflag & PARODD) {
buf[5] = 1;
dbg("%s - parity = odd", __func__);
if (cflag & CMSPAR) {
buf[5] = 3;
dbg("%s - parity = mark", __func__);
} else {
buf[5] = 1;
dbg("%s - parity = odd", __func__);
}
} else {
buf[5] = 2;
dbg("%s - parity = even", __func__);
if (cflag & CMSPAR) {
buf[5] = 4;
dbg("%s - parity = space", __func__);
} else {
buf[5] = 2;
dbg("%s - parity = even", __func__);
}
}
} else {
buf[5] = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment