From patchwork Mon Jan 19 13:22:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 43310 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A04302410B for ; Mon, 19 Jan 2015 13:23:24 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id u56sf16888778wes.3 for ; Mon, 19 Jan 2015 05:23:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=OhVW+6Foa9YW4egDt7qQXYttNeDKzfn5x+D/Fij2feE=; b=P8MVphPRm8rDIOCeRfOduh1fsF1qAAgy0233XMmxVB2B4fdS5t8/v51RY4TyASEmnX FKJEPa79rKSJH1mqqfVgzxc+DFGlDvBKsRbm+9KiB8tz0lbVqrPT4ZRKF7zi0Zi/tSJ5 3ec8nYddu0ZxRgNX1ZhbgtUzhShwgq7h6LsdgVYTtne6hR237cnag9WerBKWynA4sLrP AeWE2o2EdiInWBjKGK5JXKJvY4kFBbDSmBhzzmdJ2NEQfQ5eZ3KNdtCsJXmZxIIASgsE /h7jpHA0kO5U1KYO+2VYFyltOH9PtvpawIzHW43wYePf4XPqj/61M2vMskBr6gFhA6Sl fCPQ== X-Gm-Message-State: ALoCoQkNeFf82R+4mYoeKDRRM08ui40Fe9U+CPXKeZV64IfOnZON7GIL+VIiv6n81FV8NNMbPCeA X-Received: by 10.152.5.98 with SMTP id r2mr305173lar.6.1421673803954; Mon, 19 Jan 2015 05:23:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.9 with SMTP id t9ls420575laz.107.gmail; Mon, 19 Jan 2015 05:23:23 -0800 (PST) X-Received: by 10.112.167.68 with SMTP id zm4mr31017642lbb.93.1421673803751; Mon, 19 Jan 2015 05:23:23 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id lc12si11605594lbb.14.2015.01.19.05.23.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Jan 2015 05:23:23 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hv19so1280169lab.6 for ; Mon, 19 Jan 2015 05:23:22 -0800 (PST) X-Received: by 10.112.180.135 with SMTP id do7mr30480295lbc.23.1421673802012; Mon, 19 Jan 2015 05:23:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1089812lbb; Mon, 19 Jan 2015 05:23:21 -0800 (PST) X-Received: by 10.152.19.7 with SMTP id a7mr30751515lae.16.1421673793193; Mon, 19 Jan 2015 05:23:13 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id qf1si11469464lbb.132.2015.01.19.05.23.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Jan 2015 05:23:11 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of ulf.hansson@linaro.org: DNS timeout) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u14so28053302lbd.9 for ; Mon, 19 Jan 2015 05:23:08 -0800 (PST) X-Received: by 10.152.120.97 with SMTP id lb1mr30992219lab.76.1421673788072; Mon, 19 Jan 2015 05:23:08 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id v4sm3080344lbz.12.2015.01.19.05.23.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jan 2015 05:23:05 -0800 (PST) From: Ulf Hansson To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Kukjin Kim , Sylwester Nawrocki , Kyungmin Park , Ulf Hansson Subject: [PATCH V2 6/8] [media] exynos-gsc: Do full clock gating at runtime PM suspend Date: Mon, 19 Jan 2015 14:22:38 +0100 Message-Id: <1421673760-2600-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> References: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , To potentially save more power in runtime PM suspend state, let's also prepare/unprepare the clock from the runtime PM callbacks. Signed-off-by: Ulf Hansson --- drivers/media/platform/exynos-gsc/gsc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 5d3cfe8..0b126eb 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1163,7 +1163,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; @@ -1181,7 +1181,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;