From: Ulf Hansson Date: Wed, 9 Nov 2016 14:23:55 +0000 (-0200) Subject: [media] exynos-gsc: Do full clock gating at runtime PM suspend X-Git-Tag: v4.11-rc2~21^2~461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ebcb3e842bd933fa6792414a3b369a661d99665;p=platform%2Fkernel%2Flinux-exynos.git [media] exynos-gsc: Do full clock gating at runtime PM suspend To potentially save more power in runtime PM suspend state, let's also prepare/unprepare the clock from the runtime PM callbacks. [mszyprow: rebased onto v4.9-rc4] Signed-off-by: Ulf Hansson Signed-off-by: Marek Szyprowski Tested-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index e627653..3ac588f 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1154,7 +1154,7 @@ static int gsc_runtime_resume(struct device *dev) pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); - ret = clk_enable(gsc->clock); + ret = clk_prepare_enable(gsc->clock); if (ret) return ret; @@ -1172,7 +1172,7 @@ static int gsc_runtime_suspend(struct device *dev) ret = gsc_m2m_suspend(gsc); if (!ret) - clk_disable(gsc->clock); + clk_disable_unprepare(gsc->clock); pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); return ret;