disp: msm: dsi: Set the panel test gpio to input

This GPIO is a input signal, so need to set it
to input mode, or it will lead leakage in RBC.
This change is only to fix the power issue.

Change-Id: I87716f646c75dac2f1350a2ea55188829a4ccc9e
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
This commit is contained in:
Yuan Zhao
2019-07-12 15:17:58 +08:00
committed by Gerrit - the friendly Code Review server
parent a7b5db0465
commit f2fdcee320

View File

@@ -283,6 +283,16 @@ static int dsi_panel_gpio_request(struct dsi_panel *panel)
}
}
if (gpio_is_valid(panel->panel_test_gpio)) {
rc = gpio_request(panel->panel_test_gpio, "panel_test_gpio");
if (rc) {
pr_warn("request for panel_test_gpio failed, rc=%d\n",
rc);
panel->panel_test_gpio = -1;
rc = 0;
}
}
goto error;
error_release_mode_sel:
if (gpio_is_valid(panel->bl_config.en_gpio))
@@ -314,6 +324,9 @@ static int dsi_panel_gpio_release(struct dsi_panel *panel)
if (gpio_is_valid(panel->reset_config.lcd_mode_sel_gpio))
gpio_free(panel->reset_config.lcd_mode_sel_gpio);
if (gpio_is_valid(panel->panel_test_gpio))
gpio_free(panel->panel_test_gpio);
return rc;
}
@@ -398,6 +411,14 @@ static int dsi_panel_reset(struct dsi_panel *panel)
if (rc)
pr_err("unable to set dir for mode gpio rc=%d\n", rc);
}
if (gpio_is_valid(panel->panel_test_gpio)) {
rc = gpio_direction_input(panel->panel_test_gpio);
if (rc)
pr_warn("unable to set dir for panel test gpio rc=%d\n",
rc);
}
exit:
return rc;
}