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: 5658811 Return-Path: X-Original-To: patchwork-linux-media@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 CCCA69F333 for ; Mon, 19 Jan 2015 13:29:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03A7820389 for ; Mon, 19 Jan 2015 13:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 282F620383 for ; Mon, 19 Jan 2015 13:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbbASN3l (ORCPT ); Mon, 19 Jan 2015 08:29:41 -0500 Received: from mail-la0-f42.google.com ([209.85.215.42]:52951 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbbASN3k (ORCPT ); Mon, 19 Jan 2015 08:29:40 -0500 Received: by mail-la0-f42.google.com with SMTP id ms9so6550644lab.1 for ; Mon, 19 Jan 2015 05:29:39 -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=LKknC4u14gvMbWhRYHZkEEq5beR35aF6jj4CbjkU3npUuTyaDBLeS37j26vWLRSJ4i 0VgEfy9UgtmnImRg7whZWOWA3oEb6ybeXJzi2T0F5HkszXdtzzCPm6bQ8VjD84HZWvkJ QYLXY23M7hCIvRWazwWCuB/U33QWYyANki5qRQ2OCuFs9HEoMCTAl2KG/Nku0uz30AMv eUygQcrOTWOB6XzLptIJIuT7B46dXhwqS44YryPR7dpEX6Wed1wAHDzpa1Mf0aBzTD6t DYE/zxC98Ht2TH1mOrM9PT6iNMDLf7552shOtwQo4m7r2qlEDcAwm2VySNz51MrcfK0+ Rpww== X-Gm-Message-State: ALoCoQnOU3ws1EjSn92ALWCBu8g00dz/exkRIFr4PTCm7zo/XoaxcgvEoqWlUz6BaF6Rve2yTX4S 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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=unavailable 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;