提交 1861a1ff 编写于 作者: Y Yannick Fertré 提交者: Benjamin Gaignard

drm/stm: dw_mipi_dsi-stm: add sleep power management

Implements system sleep power management ops.
Signed-off-by: NYannick Fertré <yannick.fertre@st.com>
Acked-by: NPhilippe Cornu <philippe.cornu@st.com>
Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1553156033-13792-1-git-send-email-yannick.fertre@st.com
上级 f84d3d37
...@@ -356,12 +356,40 @@ static int dw_mipi_dsi_stm_remove(struct platform_device *pdev) ...@@ -356,12 +356,40 @@ static int dw_mipi_dsi_stm_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int __maybe_unused dw_mipi_dsi_stm_suspend(struct device *dev)
{
struct dw_mipi_dsi_stm *dsi = dw_mipi_dsi_stm_plat_data.priv_data;
DRM_DEBUG_DRIVER("\n");
clk_disable_unprepare(dsi->pllref_clk);
return 0;
}
static int __maybe_unused dw_mipi_dsi_stm_resume(struct device *dev)
{
struct dw_mipi_dsi_stm *dsi = dw_mipi_dsi_stm_plat_data.priv_data;
DRM_DEBUG_DRIVER("\n");
clk_prepare_enable(dsi->pllref_clk);
return 0;
}
static const struct dev_pm_ops dw_mipi_dsi_stm_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(dw_mipi_dsi_stm_suspend,
dw_mipi_dsi_stm_resume)
};
static struct platform_driver dw_mipi_dsi_stm_driver = { static struct platform_driver dw_mipi_dsi_stm_driver = {
.probe = dw_mipi_dsi_stm_probe, .probe = dw_mipi_dsi_stm_probe,
.remove = dw_mipi_dsi_stm_remove, .remove = dw_mipi_dsi_stm_remove,
.driver = { .driver = {
.of_match_table = dw_mipi_dsi_stm_dt_ids, .of_match_table = dw_mipi_dsi_stm_dt_ids,
.name = "stm32-display-dsi", .name = "stm32-display-dsi",
.pm = &dw_mipi_dsi_stm_pm_ops,
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册