[Feature][ZXW-309][AUTOSUSPEND]Add power optimization instructions in service
Only Configure: No
Affected branch: master
Affected module: AUTOSUSPEND
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I8b69047d8cf44bf51b1688a05951a6a5dbc7c623
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
index ca823c2..c7cc274 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
@@ -236,11 +236,29 @@
#endif
#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int t106_set_lowpwr(int state)
+{
+ int ret;
+ char rsp[128];
+ char cmdstr[32];
+ if(state == 0)
+ {
+ strcpy(cmdstr, "AT+ZLOWPWR=0\r\n");
+ }
+ else
+ {
+ strcpy(cmdstr, "AT+ZLOWPWR=1\r\n");
+ }
+ ret = sc_at_send(1,cmdstr,rsp,sizeof(rsp));
+ printf("AT+ZLOWPWR result:%d %s\n",ret,rsp);
+ return ret;
+}
+
int t106_set_blacklist(int blacklist_state)
{
int ret;
char rsp[128];
- char cmdstr[256];
+ char cmdstr[128];
if(blacklist_state == 0)
{
strcpy(cmdstr, "AT+SHELL=echo \"+CREG:+CGREG:+CEREG:^MODE:\" > /sys/module/at_io/parameters/at_psm_filter\r\n");
@@ -249,9 +267,8 @@
{
strcpy(cmdstr, "AT+SHELL=echo \"\" > /sys/module/at_io/parameters/at_psm_filter\r\n");
}
- printf("cmd:%s\n",cmdstr);
ret = sc_at_send(1,cmdstr,rsp,sizeof(rsp));
- printf("sc_at_send result:%d %s\n",ret,rsp);
+ printf("AT+SHELL=echo result:%d %s\n",ret,rsp);
return ret;
}
@@ -318,7 +335,8 @@
RLOGD("t106_early_suspend start\n");
ret=lynq_sleep_status(0);
RLOGD("lynq_get_sleep_status ret=%d\n", ret);
-
+ ret = t106_set_lowpwr(1);
+ RLOGD("t106_set_lowpwr status ret=%d\n", ret);
system("zlog_nvctrl -m 1");
ret = t106_set_whitelist();
if(ret)
@@ -350,7 +368,8 @@
RLOGD("sc_mnet_whitelist_clear ret=%d\n", ret);
}
system("zlog_nvctrl -m 0");
-
+ ret = t106_set_lowpwr(0);
+ RLOGD("t106_set_lowpwr status ret=%d\n", ret);
ret=lynq_sleep_status(1);
RLOGD("lynq_get_sleep_status ret=%d\n", ret);