Added Detection Logic For QMI_PDS Target.

Added run time detection of PDS enabled fusion target
to loc_target(), to support fusion platforms that has
PDS service enabled.

Change-Id: Ic53df027540f00eec9259776351b6bbc9afa0521
CRs-Fixed: 699757
This commit is contained in:
Kevin Tang 2014-10-10 10:35:28 -07:00
parent 10928f9622
commit fb9c641bb8
2 changed files with 9 additions and 2 deletions

View file

@ -46,6 +46,7 @@
#define MSM8930_ID_2 "116"
#define APQ8030_ID_1 "157"
#define APQ8074_ID_1 "184"
#define PDS_ID_1 "178"
#define LINE_LEN 100
#define STR_LIQUID "Liquid"
@ -206,8 +207,12 @@ unsigned int loc_get_target(void)
} else {
read_a_line(id_dep, rd_id, LINE_LEN);
}
if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){
if( !memcmp(rd_hw_platform, STR_MTP, LENGTH(STR_MTP)) ){
if( !memcmp(rd_id, PDS_ID_1, LENGTH(PDS_ID_1))
&& IS_STR_END(rd_id[LENGTH(PDS_ID_1)]) )
gTarget = TARGET_PDS;
}
else if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){
if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1))
&& IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) )
gTarget = TARGET_MPQ;

View file

@ -35,6 +35,7 @@
#define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC)
#define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC)
#define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC)
#define TARGET_PDS TARGET_SET(GNSS_PDS, NO_SSC)
#define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC)
#define getTargetGnssType(target) (target>>1)
@ -60,6 +61,7 @@ typedef enum {
GNSS_GSS,
GNSS_MDM,
GNSS_QCA1530,
GNSS_PDS,
GNSS_UNKNOWN
}GNSS_TARGET;