tty: n_gsm: add RING/CD control support
authorDaniel Starke <daniel.starke@siemens.com>
Mon, 6 Feb 2023 11:46:05 +0000 (12:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 12:19:48 +0000 (13:19 +0100)
commit42ec0b93e47f72bc701799330e67e4cef2df02c5
tree51527ffc1f8e9fc240ab9b28ee1e8c8e9e1a02ec
parent9bd6dcb8ccb1a7d18534a88ff0d11e466a3a98a4
tty: n_gsm: add RING/CD control support

The status lines ring and carrier detect are used by the modem to signal
incoming calls (RING) or an established connection (CD). This is
implemented as physical lines on a standard RS232 connection. However,
the muxer protocol encodes these status lines as modem bits IC and DV.
These incoming lines are masked by tty driver (see tty_io.c) and cannot be
set by a user application.

Allow setting RING via TIOCM_OUT1 and CD via TIOCM_OUT2 to allow
implementation of a modem or modem emulator.

Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20230206114606.2133-3-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c