author: shengyang.chen <shengyang.chen@starfivetech.com> 2023-01-16 19:45:28 +0800
committer: shengyang.chen <shengyang.chen@starfivetech.com> 2023-02-22 16:38:14 +0800
commit: 6d950189e41f87e7bdb950ad14584f881b67134b
parent: 8912851431b39821eb76965798bc730f5b079137
Commit Summary:
Diffstat:
1 file changed, 22 insertions, 1 deletion
diff --git a/drivers/gpu/drm/verisilicon/inno_hdmi.c b/drivers/gpu/drm/verisilicon/inno_hdmi.c
index 56b5d84d0e45..6cf29f9f80c4 100644
--- a/drivers/gpu/drm/verisilicon/inno_hdmi.c
+++ b/drivers/gpu/drm/verisilicon/inno_hdmi.c
@@ -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