xmm: prefer port flagged as AT_GPS_CONTROL to manage the GNSS engine
Use the new AT_GPS_CONTROL udev tag to decide which is the best port to manage the GNSS engine.
This commit is contained in:
@@ -1018,6 +1018,9 @@ gps_engine_start (GTask *task)
|
|||||||
/* Look for an AT port to use for GPS. Prefer secondary port if there is one,
|
/* Look for an AT port to use for GPS. Prefer secondary port if there is one,
|
||||||
* otherwise use primary */
|
* otherwise use primary */
|
||||||
g_assert (!priv->gps_port);
|
g_assert (!priv->gps_port);
|
||||||
|
|
||||||
|
priv->gps_port = mm_base_modem_get_port_gps_control (MM_BASE_MODEM (self));
|
||||||
|
if (!priv->gps_port) {
|
||||||
priv->gps_port = mm_base_modem_get_port_secondary (MM_BASE_MODEM (self));
|
priv->gps_port = mm_base_modem_get_port_secondary (MM_BASE_MODEM (self));
|
||||||
if (!priv->gps_port) {
|
if (!priv->gps_port) {
|
||||||
priv->gps_port = mm_base_modem_get_port_primary (MM_BASE_MODEM (self));
|
priv->gps_port = mm_base_modem_get_port_primary (MM_BASE_MODEM (self));
|
||||||
@@ -1028,6 +1031,7 @@ gps_engine_start (GTask *task)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case GPS_ENGINE_STATE_STANDALONE:
|
case GPS_ENGINE_STATE_STANDALONE:
|
||||||
|
Reference in New Issue
Block a user