Skip to content

Commit

Permalink
Merge branch 'CR_2975_5.15_hdmi_shengyang.chen' into 'jh7110-5.15.y-d…
Browse files Browse the repository at this point in the history
…evel'

CR_2975_riscv: linux: vout: fix hdmi hibernation resume failure cause by pmic

See merge request sdk/linux!673
  • Loading branch information
andyhu-stf committed Feb 3, 2023
2 parents f61b947 + ff5aec2 commit 7447339
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion drivers/gpu/drm/verisilicon/inno_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,34 @@ static void inno_hdmi_disable_clk_assert_rst(struct device *dev, struct inno_hdm
#ifdef CONFIG_PM_SLEEP
static int hdmi_system_pm_suspend(struct device *dev)
{
return pm_runtime_force_suspend(dev);
struct inno_hdmi *hdmi = dev_get_drvdata(dev);

pm_runtime_force_suspend(dev);

regulator_disable(hdmi->hdmi_1p8);
udelay(100);
regulator_disable(hdmi->hdmi_0p9);
udelay(100);
return 0;
}

static int hdmi_system_pm_resume(struct device *dev)
{
struct inno_hdmi *hdmi = dev_get_drvdata(dev);
int ret;
//pmic turn on
ret = regulator_enable(hdmi->hdmi_1p8);
if (ret) {
dev_err(dev, "Cannot enable hdmi_1p8 regulator\n");
return ret;
}
udelay(100);
ret = regulator_enable(hdmi->hdmi_0p9);
if (ret) {
dev_err(dev, "Cannot enable hdmi_0p9 regulator\n");
return ret;
}
udelay(100);
return pm_runtime_force_resume(dev);
}
#endif
Expand Down

0 comments on commit 7447339

Please sign in to comment.