msm: charm: Keep the pmic on during panic cases

During kernel panic, ensure the pmic of the external modem
stays on to allow collection of RAM dumps.

CRs-Fixed: 316868
Change-Id: I3ead0b2b692c80c13653d979df9cbca298566c5c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/mdm.c b/arch/arm/mach-msm/mdm.c
index 9fa1a4a..01cc48a 100644
--- a/arch/arm/mach-msm/mdm.c
+++ b/arch/arm/mach-msm/mdm.c
@@ -119,6 +119,9 @@
 
 	CHARM_DBG("%s: setting AP2MDM_ERRFATAL high for a non graceful reset\n",
 			 __func__);
+	if (get_restart_level() == RESET_SOC)
+		pm8058_stay_on();
+
 	charm_disable_irqs();
 	gpio_set_value(AP2MDM_ERRFATAL, 1);
 	gpio_set_value(AP2MDM_WAKEUP, 1);