mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
drm/rockchip: dw-dp: Move resume handling to NOIRQ phase
Fixes: b31df11baa ("drm/rockchip: dw-dp: force runtime PM suspend on system suspend")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Iaf5ceb65584cbe613c0e5c37c9586bfc235259e8
This commit is contained in:
@@ -2628,6 +2628,8 @@ static int dw_dp_bind(struct device *dev, struct device *master, void *data)
|
||||
pm_runtime_enable(dp->dev);
|
||||
pm_runtime_get_sync(dp->dev);
|
||||
|
||||
enable_irq(dp->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2635,6 +2637,8 @@ static void dw_dp_unbind(struct device *dev, struct device *master, void *data)
|
||||
{
|
||||
struct dw_dp *dp = dev_get_drvdata(dev);
|
||||
|
||||
disable_irq(dp->irq);
|
||||
|
||||
pm_runtime_put(dp->dev);
|
||||
pm_runtime_disable(dp->dev);
|
||||
|
||||
@@ -2835,8 +2839,6 @@ static int __maybe_unused dw_dp_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct dw_dp *dp = dev_get_drvdata(dev);
|
||||
|
||||
disable_irq(dp->irq);
|
||||
|
||||
clk_disable_unprepare(dp->aux_clk);
|
||||
clk_disable_unprepare(dp->apb_clk);
|
||||
clk_disable_unprepare(dp->hclk);
|
||||
@@ -2854,15 +2856,13 @@ static int __maybe_unused dw_dp_runtime_resume(struct device *dev)
|
||||
|
||||
dw_dp_init(dp);
|
||||
|
||||
enable_irq(dp->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops dw_dp_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(dw_dp_runtime_suspend, dw_dp_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static const struct of_device_id dw_dp_of_match[] = {
|
||||
|
||||
Reference in New Issue
Block a user