summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorMaarten Brock <m.brock@vanmierlo.com>2016-02-14 15:05:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-15 02:39:36 +0100
commitb7dfdea85917909b0b85913a0a727ff9dfd047f7 (patch)
treeed320bb25f13b3a088440d8d8bcfae9050c60c37 /drivers/tty
parenttty/serial: digicolor: Fix bad usage of IS_ERR_VALUE (diff)
downloadlinux-b7dfdea85917909b0b85913a0a727ff9dfd047f7.tar.xz
linux-b7dfdea85917909b0b85913a0a727ff9dfd047f7.zip
sc16is7xx: implemented set_mctrl
Add support for manual setting the modem control lines. Signed-off-by: Maarten Brock <m.brock@vanmierlo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sc16is7xx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 311e7bc07a24..025a4264430e 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -761,12 +761,20 @@ static void sc16is7xx_reg_proc(struct kthread_work *ws)
memset(&one->config, 0, sizeof(one->config));
spin_unlock_irqrestore(&one->port.lock, irqflags);
- if (config.flags & SC16IS7XX_RECONF_MD)
+ if (config.flags & SC16IS7XX_RECONF_MD) {
sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG,
SC16IS7XX_MCR_LOOP_BIT,
(one->port.mctrl & TIOCM_LOOP) ?
SC16IS7XX_MCR_LOOP_BIT : 0);
-
+ sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG,
+ SC16IS7XX_MCR_RTS_BIT,
+ (one->port.mctrl & TIOCM_RTS) ?
+ SC16IS7XX_MCR_RTS_BIT : 0);
+ sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG,
+ SC16IS7XX_MCR_DTR_BIT,
+ (one->port.mctrl & TIOCM_DTR) ?
+ SC16IS7XX_MCR_DTR_BIT : 0);
+ }
if (config.flags & SC16IS7XX_RECONF_IER)
sc16is7xx_port_update(&one->port, SC16IS7XX_IER_REG,
config.ier_clear, 0);