Add gnss 8122 support.

Change-Id: I71457eea400e55d41c59a12549b2eec5cc5e5183
diff --git a/mbtk/mbtk_gnssd/gnss_main.c b/mbtk/mbtk_gnssd/gnss_main.c
index 8e25f8e..3922f8f 100755
--- a/mbtk/mbtk_gnssd/gnss_main.c
+++ b/mbtk/mbtk_gnssd/gnss_main.c
@@ -14,6 +14,7 @@
 #include "gnss_info.h"
 
 #include "gnss_6228.h"
+#include "gnss_hd8122.h"
 
 #define GNSS_DEBUG 1
 
@@ -55,7 +56,7 @@
 
 static void help()
 {
-    LOGD("mbtk_gnssd <6228/...> <gnss_dev> <0/1>");
+    LOGD("mbtk_gnssd <6228/8122...> <gnss_dev> <0/1>");
 }
 
 static int arg_check(int argc, char *argv[])
@@ -64,8 +65,8 @@
         goto check_fail;
     }
 
-    // Only support 6228.
-    if(strcmp(argv[1], GNSS_ID_6228)) {
+    // Only support 6228/8122.
+    if(strcmp(argv[1], GNSS_ID_6228) && strcmp(argv[1], GNSS_ID_8122)) {
         goto check_fail;
     }
 
@@ -730,6 +731,18 @@
         gnss_info.gnss_dl_read_cb = gnss_6228_dl_read_cb;
         gnss_info.gnss_set = gnss_6228_set;
         gnss_info.gnss_set_cb = gnss_6228_set_cb;
+    } else if(!strcmp(argv[1], GNSS_ID_8122)) {
+        gnss_info.gnss_id = GNSS_TYPE_8122;
+        gnss_info.auto_open = (bool)atoi(argv[3]);
+        gnss_info.auto_dl_fw = FALSE;
+        gnss_info.gnss_dev_open = gnss_8122_dev_open;
+        gnss_info.gnss_dev_close = gnss_8122_dev_close;
+        gnss_info.gnss_open = gnss_8122_open;
+        gnss_info.gnss_close = gnss_8122_close;
+        gnss_info.gnss_fw_dl = gnss_8122_fw_dl;
+        gnss_info.gnss_dl_read_cb = NULL;
+        gnss_info.gnss_set = gnss_8122_set;
+        gnss_info.gnss_set_cb = NULL;
     } else {
         LOGE("No support : %s", argv[1]);
         return -1;