Browse Source

Request to suspend after all ports are closed

Request core slimbus to suspend after all
ports are closed. This is to early reset
slimbus hw  instead and avoid waiting till
time out after ports closure.

CRs-Fixed: 3536919
Change-Id: I1bf92b2651d9ee8716a06144ef75f9cb2779c415
Signed-off-by: Satish Kumar Kodishala <[email protected]>
Satish Kumar Kodishala 2 years ago
parent
commit
38173f4069
1 changed files with 4 additions and 3 deletions
  1. 4 3
      slimbus/btfm_slim.c

+ 4 - 3
slimbus/btfm_slim.c

@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/init.h>
@@ -26,7 +26,7 @@
 #include "btfm_slim_hw_interface.h"
 #endif
 
-#define DELAY_FOR_PORT_OPEN_MS (200)
+#define DELAY_FOR_PORT_OPEN_MS (20)
 #define SLIM_MANF_ID_QCOM	0x217
 #define SLIM_PROD_CODE		0x221
 #define BT_CMD_SLIM_TEST	0xbfac
@@ -250,7 +250,8 @@ int btfm_slim_disable_ch(struct btfmslim *btfmslim, struct btfmslim_ch *ch,
 		chipset_ver == QCA_APACHE_SOC_ID_0100 ||
 		chipset_ver == QCA_APACHE_SOC_ID_0110 ||
 		chipset_ver == QCA_APACHE_SOC_ID_0121)) {
-		BTFMSLIM_INFO("SB reset needed after all ports disabled, sleeping");
+		BTFMSLIM_INFO("SB reset needed after all ports disabled, send suspend and sleep");
+		slim_vote_for_suspend(btfmslim->slim_pgd);
 		msleep(DELAY_FOR_PORT_OPEN_MS);
 	}