diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2022-02-09 15:39:44 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-03-07 09:51:43 +0000 |
commit | 343f27a5e7b0226e10aec025c502703d0be9d1ac (patch) | |
tree | 01d128828e4ebb7416614d1a2e190c870429f82a /src/mm-base-modem.c | |
parent | deaf0646c4a3da4a1dc3a1bfd4157cc0ee74921f (diff) |
api: allow tagging AT ports as GPS control
There are devices with multiple AT ports where only one of them is
supposed to be used for GNSS control (and data).
Diffstat (limited to 'src/mm-base-modem.c')
-rw-r--r-- | src/mm-base-modem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c index 512c4cce..063cee6d 100644 --- a/src/mm-base-modem.c +++ b/src/mm-base-modem.c @@ -391,6 +391,13 @@ base_modem_internal_grab_port (MMBaseModem *self, mm_obj_dbg (port, "AT port flagged as PPP"); at_pflags = MM_PORT_SERIAL_AT_FLAG_PPP; } + + /* Additionally, the ports may also be flagged as GPS control explicitly, if there is + * one specific port to be used for that purpose */ + if (mm_kernel_device_get_property_as_boolean (kernel_device, ID_MM_PORT_TYPE_AT_GPS_CONTROL)) { + mm_obj_dbg (port, "AT port flagged as GPS control"); + at_pflags = MM_PORT_SERIAL_AT_FLAG_GPS_CONTROL; + } } /* The plugin may specify NONE_NO_GENERIC to avoid the generic * port type hints from being applied. */ |