board: msm: Handle VDD_PX2 leakage on EVB
Handle improper configuration of GPIO 85 during sleep
to avoid the VDD_PX2 leakage current of about 0.1 mA.
CRs-fixed: 338533
Change-Id: Ia5092a8157d89b75c3256d13066fcc93603be286
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7627a-display.c b/arch/arm/mach-msm/board-msm7627a-display.c
index b1fe0c7..bf1a4c5 100644
--- a/arch/arm/mach-msm/board-msm7627a-display.c
+++ b/arch/arm/mach-msm/board-msm7627a-display.c
@@ -535,19 +535,6 @@
return rc;
}
- rc = gpio_tlmm_config(qrd3_mipi_dsi_gpio[0], GPIO_CFG_ENABLE);
- if (rc < 0) {
- pr_err("Failed to enable LCD Bridge reset enable\n");
- return rc;
- }
-
- rc = gpio_direction_output(GPIO_QRD3_LCD_BRDG_RESET_N, 1);
- if (rc < 0) {
- pr_err("Failed GPIO bridge Reset\n");
- gpio_free(GPIO_QRD3_LCD_BRDG_RESET_N);
- return rc;
- }
-
return rc;
}
@@ -805,12 +792,30 @@
gpio_set_value_cansleep(GPIO_QRD3_LCD_EXT_1V8_EN, !!on);
if (on) {
- gpio_set_value_cansleep(GPIO_QRD3_LCD_BRDG_RESET_N, 1);
+ rc = gpio_tlmm_config(qrd3_mipi_dsi_gpio[0], GPIO_CFG_ENABLE);
+
+ if (rc < 0) {
+ pr_err("Failed to enable LCD Bridge reset enable\n");
+ return rc;
+ }
+
+ rc = gpio_direction_output(GPIO_QRD3_LCD_BRDG_RESET_N, 1);
+
+ if (rc < 0) {
+ pr_err("Failed GPIO bridge Reset\n");
+ gpio_free(GPIO_QRD3_LCD_BRDG_RESET_N);
+ return rc;
+ }
+
msleep(20);
gpio_set_value_cansleep(GPIO_QRD3_LCD_BRDG_RESET_N, 0);
msleep(20);
gpio_set_value_cansleep(GPIO_QRD3_LCD_BRDG_RESET_N, 1);
msleep(20);
+ } else {
+ gpio_tlmm_config(GPIO_CFG(GPIO_QRD3_LCD_BRDG_RESET_N, 0,
+ GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
+ GPIO_CFG_DISABLE);
}
return rc;