mdss: dsi: Add support to control bias voltage regulator
The bias voltage regulator is controlled by wled driver for the sharp panel on 8994. Add support to control this regulator to fix suspend/resume issues. Add optional "qcom,dsi-panel-bias-vreg" property to support this on specific platforms. Change-Id: Ifb02a0467dc190e673781490a918c12293d41d58 Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
This commit is contained in:
parent
332fef7869
commit
3c59706458
3 changed files with 32 additions and 0 deletions
|
@ -71,6 +71,7 @@ Optional properties:
|
|||
controller. These pin configurations are installed in the pinctrl
|
||||
device node. Refer to pinctrl-bindings.txt
|
||||
- qcom,regulator-ldo-mode: Boolean to enable ldo mode for the dsi phy regulator
|
||||
- qcom,dsi-panel-bias-vreg: Boolean to enable control of panel bias regulator
|
||||
|
||||
Example:
|
||||
mdss_dsi0: qcom,mdss_dsi@fd922800 {
|
||||
|
@ -105,6 +106,7 @@ Example:
|
|||
qcom,platform-enable-gpio = <&msmgpio 58 1>;
|
||||
qcom,platform-bklight-en-gpio = <&msmgpio 86 0>;
|
||||
qcom,platform-mode-gpio = <&msmgpio 7 0>;
|
||||
qcom,dsi-panel-bias-vreg;
|
||||
|
||||
qcom,core-supply-entries {
|
||||
#address-cells = <1>;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/leds-qpnp-wled.h>
|
||||
|
||||
#include "mdss.h"
|
||||
#include "mdss_panel.h"
|
||||
|
@ -100,6 +101,16 @@ static int mdss_dsi_panel_power_on(struct mdss_panel_data *pdata, int enable)
|
|||
goto error_enable;
|
||||
}
|
||||
}
|
||||
if (ctrl_pdata->panel_bias_vreg) {
|
||||
pr_debug("%s: Enable panel bias vreg. ndx = %d\n",
|
||||
__func__, ctrl_pdata->ndx);
|
||||
if (qpnp_ibb_enable(true))
|
||||
pr_err("Unable to configure bias vreg\n");
|
||||
/*
|
||||
* Add delay recommended by panel specs
|
||||
*/
|
||||
udelay(2000);
|
||||
}
|
||||
|
||||
if (!pdata->panel_info.mipi.lp11_init) {
|
||||
if (mdss_dsi_pinctrl_set_state(ctrl_pdata, true))
|
||||
|
@ -122,6 +133,16 @@ static int mdss_dsi_panel_power_on(struct mdss_panel_data *pdata, int enable)
|
|||
if (mdss_dsi_pinctrl_set_state(ctrl_pdata, false))
|
||||
pr_debug("reset disable: pinctrl not enabled\n");
|
||||
|
||||
if (ctrl_pdata->panel_bias_vreg) {
|
||||
pr_debug("%s: Disabling panel bias vreg. ndx = %d\n",
|
||||
__func__, ctrl_pdata->ndx);
|
||||
if (qpnp_ibb_enable(false))
|
||||
pr_err("Unable to disable bias vreg\n");
|
||||
/*
|
||||
* Add delay recommended by panel specs
|
||||
*/
|
||||
udelay(2000);
|
||||
}
|
||||
for (i = DSI_MAX_PM - 1; i >= 0; i--) {
|
||||
/*
|
||||
* Core power module will be disabled when the
|
||||
|
@ -1477,6 +1498,14 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Currently, the Bias vreg is controlled by wled driver.
|
||||
* Once we have support from pmic driver, implement the
|
||||
* bias vreg control using the existing vreg apis.
|
||||
*/
|
||||
ctrl_pdata->panel_bias_vreg = of_property_read_bool(
|
||||
pdev->dev.of_node, "qcom,dsi-panel-bias-vreg");
|
||||
|
||||
/* DSI panels can be different between controllers */
|
||||
rc = mdss_dsi_get_panel_cfg(panel_cfg);
|
||||
if (!rc)
|
||||
|
|
|
@ -306,6 +306,7 @@ struct mdss_dsi_ctrl_pdata {
|
|||
int bklt_max;
|
||||
int new_fps;
|
||||
int pwm_enabled;
|
||||
bool panel_bias_vreg;
|
||||
struct mdss_rect roi;
|
||||
struct pwm_device *pwm_bl;
|
||||
struct dsi_drv_cm_data shared_pdata;
|
||||
|
|
Loading…
Add table
Reference in a new issue