tty: Allow RI, DSR and CTS modem status bits in tiocmset

Allow modem status bits like RI, DSR and CTS in tiocmset. TTY drivers,
for example USB function serial driver, which talks to DCE on behalf
DTE and running in DCE are interested in these bits.

CRs-fixed: 300912
Change-Id: I322bb4ffe546f0bead5576faa0e62ebbc57214bb
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Chiranjeevi Velempati 2011-08-17 14:22:33 +05:30 committed by Stephen Boyd
parent a88155de7d
commit ef4155d55d

View file

@ -2576,8 +2576,11 @@ static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
clear = ~val; clear = ~val;
break; break;
} }
set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP;
clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP|TIOCM_CD|
TIOCM_RI|TIOCM_DSR|TIOCM_CTS;
clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP|TIOCM_CD|
TIOCM_RI|TIOCM_DSR|TIOCM_CTS;
return tty->ops->tiocmset(tty, set, clear); return tty->ops->tiocmset(tty, set, clear);
} }