Enable "auto" target for APQ8960 Automotive ADP platform
APQ8960 Automotive platforms use "auto" as a target name for ro.baseband property. Appropriate GPS driver changes were, 1. define GNSS_AUTO enum constant 2. Enable GNSS drivers for "auto" target. Change-Id: I463db7ac1c3e2dd6101e457ad723bb16adf5aacb CRs-Fixed: 771597
This commit is contained in:
parent
452767c1e2
commit
32b1baae2b
4 changed files with 10 additions and 0 deletions
|
@ -247,6 +247,7 @@ extern "C" const GpsInterface* get_gps_interface()
|
|||
switch (gnssType)
|
||||
{
|
||||
case GNSS_GSS:
|
||||
case GNSS_AUTO:
|
||||
//APQ8064
|
||||
gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB);
|
||||
gss_fd = open("/dev/gss", O_RDONLY);
|
||||
|
|
|
@ -113,6 +113,7 @@ loc_name_val_s_type target_name[] =
|
|||
NAME_VAL(GNSS_GSS),
|
||||
NAME_VAL(GNSS_MDM),
|
||||
NAME_VAL(GNSS_QCA1530),
|
||||
NAME_VAL(GNSS_AUTO),
|
||||
NAME_VAL(GNSS_UNKNOWN)
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#define STR_SURF "Surf"
|
||||
#define STR_MTP "MTP"
|
||||
#define STR_APQ "apq"
|
||||
#define STR_AUTO "auto"
|
||||
#define IS_STR_END(c) ((c) == '\0' || (c) == '\n' || (c) == '\r')
|
||||
#define LENGTH(s) (sizeof(s) - 1)
|
||||
#define GPS_CHECK_NO_ERROR 0
|
||||
|
@ -207,6 +208,11 @@ unsigned int loc_get_target(void)
|
|||
} else {
|
||||
read_a_line(id_dep, rd_id, LINE_LEN);
|
||||
}
|
||||
if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) )
|
||||
{
|
||||
gTarget = TARGET_AUTO;
|
||||
goto detected;
|
||||
}
|
||||
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)]) )
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#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_AUTO TARGET_SET(GNSS_AUTO, NO_SSC)
|
||||
#define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC)
|
||||
#define getTargetGnssType(target) (target>>1)
|
||||
|
||||
|
@ -62,6 +63,7 @@ typedef enum {
|
|||
GNSS_MDM,
|
||||
GNSS_QCA1530,
|
||||
GNSS_PDS,
|
||||
GNSS_AUTO,
|
||||
GNSS_UNKNOWN
|
||||
}GNSS_TARGET;
|
||||
|
||||
|
|
Loading…
Reference in a new issue