msm: board-msm7627a-wlan: Handle gpio request failures properly
Target freeze is observed when AR600x wlan driver is loaded
on 7x27a FFA platform which has WCN chipset in it.
msm_AR600X_setup_power() func already takes care of disabling
regulator setting in gpio request (WLAN_DEEP_SLEEP_N) failure
cases. msm_AR600X_shutdown_power() func should NOT try to disable
any regulator related setting when there is gpio request
failures. Doing that in msm_AR600X_shutdown_power() will
lead to the target freeze.
This patch modifies msm_AR600X_shutdown_power() not to perform
any regulator setting in case of gpio request failures.
Change-Id: Iec4737d7c1479fba9d644cc01e38ff3c1ffa02b2
Signed-off-by: Ming-yi Lin <mylin@codeaurora.org>
(cherry picked from commit 920f220b3dbc6898df6781f4f812a2556169906d)
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7627a-wlan.c b/arch/arm/mach-msm/board-msm7627a-wlan.c
index 0949c5f..79f213e 100644
--- a/arch/arm/mach-msm/board-msm7627a-wlan.c
+++ b/arch/arm/mach-msm/board-msm7627a-wlan.c
@@ -336,6 +336,10 @@
goto set_gpio_fail;
}
gpio_free(gpio_wlan_sys_rest_en);
+ } else {
+ pr_err("%s: WLAN sys_rest_en GPIO %d request failed %d\n",
+ __func__, gpio_wlan_sys_rest_en, rc);
+ goto out;
}
}
@@ -373,6 +377,7 @@
gpio_free(GPIO_WLAN_3V3_EN);
reg_disable:
wlan_switch_regulators(0);
+out:
pr_info("WLAN power-down failed\n");
return rc;
}