diff options
-rw-r--r-- | include/ModemManager-tags.h | 13 | ||||
-rw-r--r-- | src/mm-base-modem.c | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/ModemManager-tags.h b/include/ModemManager-tags.h index ec781426..ad813b15 100644 --- a/include/ModemManager-tags.h +++ b/include/ModemManager-tags.h @@ -130,6 +130,19 @@ #define ID_MM_PORT_TYPE_AT_SECONDARY "ID_MM_PORT_TYPE_AT_SECONDARY" /** + * ID_MM_PORT_TYPE_AT_GPS_CONTROL: + * + * This is a port-specific tag applied to TTYs that we know in advance + * are AT ports to be used for GPS control. Depending on the device, + * this may or may not mean the same port is also used fo GPS data. + * + * This tag will also proevent QCDM probing on the port. + * + * Since: 1.20 + */ +#define ID_MM_PORT_TYPE_AT_GPS_CONTROL "ID_MM_PORT_TYPE_AT_GPS_CONTROL" + +/** * ID_MM_PORT_TYPE_AT_PPP: * * This is a port-specific tag applied to TTYs that we know in advance 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. */ |