[Feature][T8TSK-47][TCAM_T800_SW_0257] add wifi power control in lpm for temp

Change-Id: Ib31740d7d9a5c23f7cef158dd2a24707eb376eda
diff --git a/src/kernel/linux/v4.19/drivers/misc/mediatek/lpm/modules/platform/mt6880/suspend/mtk_suspend.c b/src/kernel/linux/v4.19/drivers/misc/mediatek/lpm/modules/platform/mt6880/suspend/mtk_suspend.c
index e4a5c4e..0fdc558 100644
--- a/src/kernel/linux/v4.19/drivers/misc/mediatek/lpm/modules/platform/mt6880/suspend/mtk_suspend.c
+++ b/src/kernel/linux/v4.19/drivers/misc/mediatek/lpm/modules/platform/mt6880/suspend/mtk_suspend.c
@@ -30,6 +30,9 @@
 #ifdef CONFIG_MTK_CCCI_DEVICES
 #include <mt-plat/mtk_ccci_common.h>
 #endif
+#include <linux/gpio.h>
+
+#define MTK_GSW_WG870_GPIO_PWR_RST
 
 unsigned int mtk_suspend_status;
 u64 before_md_sleep_time;
@@ -96,6 +99,15 @@
 	if (susp_status)
 		*susp_status = status;
 
+	//you.chen@2022-07-15 add for shutdown wifi power when suspend begin(for temp)
+#if defined(MTK_GSW_WG870_GPIO_PWR_RST)
+    /* Control GPIO182 for turn off WIFI chip */
+    printk_deferred("mt_spm_suspend_enter\n");
+    gpio_set_value(202+268, 0);
+    gpio_set_value(182+268, 0);
+#endif
+	//you.chen@2022-07-15 add for shutdown wifi power when suspend end(for temp)
+
 	return 0;
 }
 
@@ -103,6 +115,19 @@
 static inline int mtk_suspend_common_resume(unsigned int susp_status)
 {
 	/* Implement suspend common flow here */
+	//you.chen@2022-07-15 add for shutdown wifi power when suspend begin(for temp)
+#if defined(MTK_GSW_WG870_GPIO_PWR_RST)
+    /* Control GPIO182 for turn on WIFI chip */
+    gpio_set_value(182+268, 1);
+    mdelay(1);
+    gpio_set_value(202+268, 1);
+
+    /* Waiting for WIFI chip done*/
+    mdelay(10);
+    printk_deferred("mt_spm_suspend_resume\n");
+#endif
+	//you.chen@2022-07-15 add for shutdown wifi power when suspend end(for temp)
+
 	return 0;
 }