msm: display: Add MDP footswitch regulator control for HDMI PLL

Add support for enabling HDMI PLL regulator along with footswitch
enable/disable to avoid PLL lock detection failures during
suspend/resume

Change-Id: I9b161cab50d2b6c39de39b588e326f5ff97cbc65
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
This commit is contained in:
Ravishangar Kalyanam
2012-06-20 18:30:05 -07:00
committed by Stephen Boyd
parent 3ac0046c92
commit 038de030b0
3 changed files with 17 additions and 1 deletions

View File

@@ -221,6 +221,7 @@ VREG_CONSUMERS(LVS7) = {
REGULATOR_SUPPLY("8921_lvs7", NULL),
REGULATOR_SUPPLY("pll_vdd", "pil_riva"),
REGULATOR_SUPPLY("lvds_vdda", "lvds.0"),
REGULATOR_SUPPLY("hdmi_pll_fs", "mdp.0"),
REGULATOR_SUPPLY("dsi1_vddio", "mipi_dsi.1"),
REGULATOR_SUPPLY("hdmi_vdda", "hdmi_msm.0"),
};

View File

@@ -116,6 +116,7 @@ VREG_CONSUMERS(L23) = {
REGULATOR_SUPPLY("8921_l23", NULL),
REGULATOR_SUPPLY("dsi_vddio", "mipi_dsi.1"),
REGULATOR_SUPPLY("hdmi_avdd", "hdmi_msm.0"),
REGULATOR_SUPPLY("hdmi_pll_fs", "mdp.0"),
REGULATOR_SUPPLY("pll_vdd", "pil_riva"),
REGULATOR_SUPPLY("pll_vdd", "pil_qdsp6v4.1"),
REGULATOR_SUPPLY("pll_vdd", "pil_qdsp6v4.2"),

View File

@@ -51,7 +51,7 @@ static struct clk *mdp_lut_clk;
int mdp_rev;
static struct platform_device *mdp_init_pdev;
static struct regulator *footswitch;
static struct regulator *footswitch, *hdmi_pll_fs;
static unsigned int mdp_footswitch_on;
struct completion mdp_ppp_comp;
@@ -2122,10 +2122,16 @@ static int mdp_irq_clk_setup(struct platform_device *pdev,
}
disable_irq(mdp_irq);
hdmi_pll_fs = regulator_get(&pdev->dev, "hdmi_pll_fs");
if (IS_ERR(hdmi_pll_fs))
hdmi_pll_fs = NULL;
footswitch = regulator_get(&pdev->dev, "vdd");
if (IS_ERR(footswitch))
footswitch = NULL;
else {
if (hdmi_pll_fs)
regulator_enable(hdmi_pll_fs);
regulator_enable(footswitch);
mdp_footswitch_on = 1;
@@ -2134,6 +2140,8 @@ static int mdp_irq_clk_setup(struct platform_device *pdev,
msleep(20);
regulator_enable(footswitch);
}
if (hdmi_pll_fs)
regulator_disable(hdmi_pll_fs);
}
mdp_clk = clk_get(&pdev->dev, "core_clk");
@@ -2625,6 +2633,9 @@ void mdp_footswitch_ctrl(boolean on)
return;
}
if (hdmi_pll_fs)
regulator_enable(hdmi_pll_fs);
if (on && !mdp_footswitch_on) {
pr_debug("Enable MDP FS\n");
regulator_enable(footswitch);
@@ -2635,6 +2646,9 @@ void mdp_footswitch_ctrl(boolean on)
mdp_footswitch_on = 0;
}
if (hdmi_pll_fs)
regulator_disable(hdmi_pll_fs);
mutex_unlock(&mdp_suspend_mutex);
}