Add basic change for v1453

Change-Id: I9497a61bbc3717f66413794a4e7dee0347c0bc33
diff --git a/mbtk/liblynq_lib_rilv2/lynq_thermal.c b/mbtk/liblynq_lib_rilv2/lynq_thermal.c
new file mode 100755
index 0000000..6d0c76f
--- /dev/null
+++ b/mbtk/liblynq_lib_rilv2/lynq_thermal.c
@@ -0,0 +1,98 @@
+#if 1
+#include "mbtk_type.h"
+#include "mbtk_log.h"
+#include "lynq_qser_thermal.h"
+#include "mbtk_ril_api.h"
+
+/****************************DEFINE***************************************/
+#define QSER_RESULT_FAIL    -1
+#define QSER_RESULT_SUCCESS 0
+/****************************DEFINE***************************************/
+
+/****************************VARIABLE***************************************/
+static mbtk_ril_handle* qser_info_handle = NULL;
+
+/****************************VARIABLE***************************************/
+
+
+/******************************FUNC*****************************************/
+static int qser_thermal_client_init(void)
+{
+    qser_info_handle = mbtk_ril_open(MBTK_AT_PORT_DEF);
+
+    if (qser_info_handle == NULL)
+    {
+        LOGE("[qser_led] qser_info_handle fail.");
+        return QSER_RESULT_FAIL;
+    }
+    else
+    {
+        LOGI("[qser_led] qser_info_handle success.");
+        return QSER_RESULT_SUCCESS;
+    }
+}
+
+static int qser_thermal_client_deinit(void)
+{
+    if(qser_info_handle != NULL)
+    {
+        int ret_ril = mbtk_ril_close(MBTK_AT_PORT_DEF);
+        if (ret_ril == MBTK_RIL_ERR_SUCCESS)
+        {
+            LOGI("deinit qser_info_handle is succuess");
+            return QSER_RESULT_SUCCESS;
+        }
+        else
+        {
+            LOGE("deinit qser_info_handle is error(%d)",ret_ril);
+            return QSER_RESULT_FAIL;
+        }
+    }
+
+    return QSER_RESULT_SUCCESS;
+}
+
+/******************************FUNC*****************************************/
+
+/****************************API***************************************/
+int get_thermal_zone(int *numbers, int size)
+{
+    if(numbers == NULL)
+    {
+        LOGE("[qser_thermal]: numbers is NULL!");
+        return QSER_RESULT_FAIL;
+    }
+    
+    int ret = 0;
+    int thermal = -1;
+    int thermal_num = 0;
+    int temp = 0;
+
+    ret = qser_thermal_client_init();
+    if(ret != QSER_RESULT_SUCCESS)
+    {
+        LOGE("[qser_thermal]qser_led_client_init fail.");
+        return QSER_RESULT_FAIL;
+    }
+    
+    ret = mbtk_temp_get(qser_info_handle, 0, &temp);
+    thermal = temp;
+    if(ret != QSER_RESULT_SUCCESS)
+    {
+        LOGE("[qser_thermal]mbtk_temp_get fail.");
+        qser_thermal_client_deinit();
+        return QSER_RESULT_FAIL;
+    }
+
+    qser_thermal_client_deinit();
+    numbers[thermal_num++] = thermal;
+    for(; thermal_num < size; thermal_num++)
+    {
+        numbers[thermal_num] = 0;
+    }
+
+    return size;
+}
+/****************************API***************************************/
+
+#endif