Merge "[Bugfix][bug-view-1036] Support the fourth modem in DRDI"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
index d5b8bbf..6745a8f 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
@@ -449,7 +449,9 @@
T3396_COUNTS=3
ECALL_T2_TIMER=3600
NGECALL_FORTEST=0
-CUSTOMER_FLAG=0
+#LYNQ_HUANG_QING_AT_20250428_ZXW_TASK_1120_CR_20250327578D9BCF_LET_ZXIC_SUPPORT_LYNQ_NG_ECALL_MODIFY_BEGIN
+CUSTOMER_FLAG=1
+#LYNQ_HUANG_QING_AT_20250428_ZXW_TASK_1120_CR_20250327578D9BCF_LET_ZXIC_SUPPORT_LYNQ_NG_ECALL_MODIFY_END
#for volte end
DEBUG_INFO_FILE_PATH=/mnt/userdata
DEBUG_INFO_FILE_NUM=2
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
index 830630d..f79c485 100644
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
@@ -17,6 +17,9 @@
//#include <linux/wakelock.h>
#include <linux/pm_wakeup.h>
+u32 adc_query_count = 3;
+EXPORT_SYMBOL(adc_query_count);
+
#define ZX234290_VBAT_ADC_COMPENDATE_VALUE 50
typedef enum adc_channel
{
@@ -352,7 +355,7 @@
**************************************************************************/
uint get_battery_voltage(void)
{
- int counter = 3;
+ int counter = adc_query_count;
int index=0;
int tmpValue=0,totalValue=0;
uint avgValue;
@@ -381,7 +384,7 @@
**************************************************************************/
uint get_adc1_voltage(void)
{
- int counter = 3;
+ int counter = adc_query_count;
int index=0;
int tmpValue=0,totalValue=0;
uint avgValue;
@@ -411,7 +414,7 @@
//extern struct wake_lock adc_wake_lock;
uint get_adc2_voltage(void)
{
- int counter = 3;
+ int counter = adc_query_count;
int index=0;
int tmpValue=0,totalValue=0;
uint avgValue;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-core.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-core.c
index 6da76d2..172c551 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-core.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-core.c
@@ -30,6 +30,7 @@
#include <dma_cfg.h>
#include <linux/reboot.h>
+extern u32 adc_query_count;
#define USER_RST_TO_NORMAL 1
@@ -536,6 +537,23 @@
DEFINE_SIMPLE_ATTRIBUTE(fops_adc_ro, debugfs_adc_get, NULL, "%llumV\n");
+static int debugfs_adc_count_set(void *data, u64 val)
+{
+ if (val > 0 && val <= 3) {
+ adc_query_count = (u32)val;
+ return 0;
+ }
+ return -EINVAL;
+}
+
+static int debugfs_adc_count_get(void *data, u64 *val)
+{
+ *val = adc_query_count;
+ return 0;
+}
+
+DEFINE_SIMPLE_ATTRIBUTE(fops_adc_count, debugfs_adc_count_get, debugfs_adc_count_set, "%llu\n");
+
static struct dentry *g_pmu_root;
extern u32 int_irq_times;
@@ -579,6 +597,18 @@
dev_err(zx234290->dev, "debugfs_create_dir err=%d\n", IS_ERR(node));
goto err;
}
+ // Add node to set ADC query count
+ node = debugfs_create_file("set_adc_count", S_IRUGO | S_IWUGO, root, NULL, &fops_adc_count);
+ if (!node){
+ dev_err(zx234290->dev, "debugfs_create_dir err=%d\n", IS_ERR(node));
+ goto err;
+ }
+ // Add node to get ADC query count
+ node = debugfs_create_file("get_adc_count", S_IRUGO, root, NULL, &fops_adc_count);
+ if (!node){
+ dev_err(zx234290->dev, "debugfs_create_dir err=%d\n", IS_ERR(node));
+ goto err;
+ }
//print u32
debugfs_create_u32("irq_cnt", S_IRUGO, root, &int_irq_times);