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: 5658851 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E71C49F333 for ; Mon, 19 Jan 2015 13:30:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3274920389 for ; Mon, 19 Jan 2015 13:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 577CD20382 for ; Mon, 19 Jan 2015 13:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751963AbbASNah (ORCPT ); Mon, 19 Jan 2015 08:30:37 -0500 Received: from mail-la0-f47.google.com ([209.85.215.47]:58108 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751659AbbASNah (ORCPT ); Mon, 19 Jan 2015 08:30:37 -0500 Received: by mail-la0-f47.google.com with SMTP id hv19so1322082lab.6 for ; Mon, 19 Jan 2015 05:30:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OhVW+6Foa9YW4egDt7qQXYttNeDKzfn5x+D/Fij2feE=; b=akxuMmDHRIBcMSrIhal+37U3dkIn436EeagmQIoYnrwUoQxN6LfeMgjEpNODi9O4Kb /G5a3ZwPnVpGSwtav851pXbnFql91zWrcY8VdOtgxMGF2m45NElUO8dmbIpbPjacQvi3 5BCF9Hwt2bFSiPX0T6kfD6UJjyzz3qmTJM0WosPpaFqZNuvHLTLdEqqecSIaAkr58uya QVee4DMqL7z4BYsdLcBCJntBKgeaPQHpjShjSua/zQNRCNiEmmrlAOOPa7wD5smZLBja CvQXoPNZIk5JL4r1mpKA/WGk+j3kWWYZ9D3X1BDwZD+uac327HNk7l0QkspVGjSyr393 v3Qg== X-Gm-Message-State: ALoCoQnL/4lUGaqU2q2/f0bPF6UnNWj122qSqK5dhlFx4N6HlQXW54Jw/vakorGZLmpGKqNmK52U 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;