telit: add GE910 #PORTCFG layouts
GE910 family supports #PORTCFG layouts different than HE910 family ones. This patch properly tags GE910 ports according to Telit document "GE910 Family Ports Arrangements, 1vv0301049"
This commit is contained in:

committed by
Aleksander Morgado

parent
30bcf5605c
commit
d5cfad49d8
@@ -26,6 +26,8 @@
|
|||||||
#define TAG_TELIT_AUX_PORT "ID_MM_TELIT_PORT_TYPE_AUX"
|
#define TAG_TELIT_AUX_PORT "ID_MM_TELIT_PORT_TYPE_AUX"
|
||||||
#define TAG_TELIT_NMEA_PORT "ID_MM_TELIT_PORT_TYPE_NMEA"
|
#define TAG_TELIT_NMEA_PORT "ID_MM_TELIT_PORT_TYPE_NMEA"
|
||||||
|
|
||||||
|
#define TELIT_GE910_FAMILY_PID 0x0022
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
telit_grab_port (MMPlugin *self,
|
telit_grab_port (MMPlugin *self,
|
||||||
MMBaseModem *modem,
|
MMBaseModem *modem,
|
||||||
@@ -143,6 +145,7 @@ cache_port_mode (MMDevice *device,
|
|||||||
|
|
||||||
/* Reference for port configurations:
|
/* Reference for port configurations:
|
||||||
* HE910/UE910/UL865 Families Ports Arrangements User Guide
|
* HE910/UE910/UL865 Families Ports Arrangements User Guide
|
||||||
|
* GE910 Family Ports Arrangements User Guide
|
||||||
*/
|
*/
|
||||||
switch (portcfg_current) {
|
switch (portcfg_current) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -154,6 +157,10 @@ cache_port_mode (MMDevice *device,
|
|||||||
case 10:
|
case 10:
|
||||||
case 11:
|
case 11:
|
||||||
g_object_set_data (G_OBJECT (device), TAG_TELIT_MODEM_PORT, "00");
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_MODEM_PORT, "00");
|
||||||
|
|
||||||
|
if (mm_device_get_product (device) == TELIT_GE910_FAMILY_PID)
|
||||||
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "02");
|
||||||
|
else
|
||||||
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "06");
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "06");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@@ -164,8 +171,14 @@ cache_port_mode (MMDevice *device,
|
|||||||
case 8:
|
case 8:
|
||||||
case 12:
|
case 12:
|
||||||
g_object_set_data (G_OBJECT (device), TAG_TELIT_MODEM_PORT, "00");
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_MODEM_PORT, "00");
|
||||||
|
|
||||||
|
if (mm_device_get_product (device) == TELIT_GE910_FAMILY_PID) {
|
||||||
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "02");
|
||||||
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_NMEA_PORT, "04");
|
||||||
|
} else {
|
||||||
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "06");
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_AUX_PORT, "06");
|
||||||
g_object_set_data (G_OBJECT (device), TAG_TELIT_NMEA_PORT, "0a");
|
g_object_set_data (G_OBJECT (device), TAG_TELIT_NMEA_PORT, "0a");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* portcfg value not supported */
|
/* portcfg value not supported */
|
||||||
|
Reference in New Issue
Block a user