diff options
author | Hsin-Yi Wang <hsinyi@chromium.org> | 2022-07-06 15:52:52 +0300 |
---|---|---|
committer | Robert Foss <robert.foss@linaro.org> | 2022-07-06 16:19:50 +0300 |
commit | aa1965973cc734bd61294b675ac9763cddcac0ed (patch) | |
tree | 6ed8989b5e037a89318f6ad48fdd06a4343d06d0 /drivers/gpu/drm/bridge/analogix | |
parent | e660916b7f4dd3f17e5f28707213b66c1553d83b (diff) | |
download | linux-aa1965973cc734bd61294b675ac9763cddcac0ed.tar.xz |
drm/bridge: anx7625: use pm_runtime_force_suspend(resume)
There's no need to check for IRQ or disable it in suspend.
Use pm_runtime_force_suspend(resume) to make sure anx7625 is powered off
correctly. Make the system suspend/resume and pm runtime suspend/resume
more consistent.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Xin Ji <xji@analogixsemi.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220706125254.2474095-3-hsinyi@chromium.org
Diffstat (limited to 'drivers/gpu/drm/bridge/analogix')
-rw-r--r-- | drivers/gpu/drm/bridge/analogix/anx7625.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index ab346d32d873..fcf07a037c2c 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2504,38 +2504,9 @@ static int __maybe_unused anx7625_runtime_pm_resume(struct device *dev) return 0; } -static int __maybe_unused anx7625_resume(struct device *dev) -{ - struct anx7625_data *ctx = dev_get_drvdata(dev); - - if (!ctx->pdata.intp_irq) - return 0; - - if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev)) { - enable_irq(ctx->pdata.intp_irq); - anx7625_runtime_pm_resume(dev); - } - - return 0; -} - -static int __maybe_unused anx7625_suspend(struct device *dev) -{ - struct anx7625_data *ctx = dev_get_drvdata(dev); - - if (!ctx->pdata.intp_irq) - return 0; - - if (!pm_runtime_enabled(dev) || !pm_runtime_suspended(dev)) { - anx7625_runtime_pm_suspend(dev); - disable_irq(ctx->pdata.intp_irq); - } - - return 0; -} - static const struct dev_pm_ops anx7625_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(anx7625_suspend, anx7625_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(anx7625_runtime_pm_suspend, anx7625_runtime_pm_resume, NULL) }; |