From patchwork Tue Oct 14 07:15:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5078591 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C7E1D9FB83 for ; Tue, 14 Oct 2014 07:16:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A00620148 for ; Tue, 14 Oct 2014 07:16:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A05920166 for ; Tue, 14 Oct 2014 07:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754661AbaJNHQX (ORCPT ); Tue, 14 Oct 2014 03:16:23 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:43873 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754555AbaJNHQK (ORCPT ); Tue, 14 Oct 2014 03:16:10 -0400 Received: by mail-lb0-f171.google.com with SMTP id z12so7629799lbi.2 for ; Tue, 14 Oct 2014 00:16:09 -0700 (PDT) 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=Dy6drD0zEmNQ9qaqPrXqPz8VeGNoBU4rqXC6rLXdrU0=; b=kkssUyIA99bqUxGrU6OR3JOwDQ2EQqvsgOXmGzRRLRRCzGSkwdah4YKXaNr4KV5Wts OqVAzF1uN9K7ASF7J+pW17mout73FiQYA0EfJER173HGL4h24PnPhLIQaRdfuAaBiihj 4KwIQmFLo4OwEp9XLwAVFDVDIQOxnrQ1HtoQKqcPrfNCqB8W5Ii6p/aoRT8sBKF/+8CS HBKU+xk/7gGo6K5+LGTUhwn20W8YyvPezz1BV0GjzRylH30GiFyuIUrXfi/fiVpIzTqB XxBvsyIJ4RzN3fI5PKJ8V7Hafc59uBCctQq7tzfEgcSKO3zQoB+hKr9x8K+5xFyUKngZ Emtw== X-Gm-Message-State: ALoCoQk4BTqov0XlgTki9MYmEf9VdOG7WRR0SSKxce83DhjWdr1yEiVFLajVxERP2aAlGfVi8X4N X-Received: by 10.152.21.170 with SMTP id w10mr3391908lae.9.1413270968904; Tue, 14 Oct 2014 00:16:08 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id a2sm5279497lbs.21.2014.10.14.00.16.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Oct 2014 00:16:08 -0700 (PDT) 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, linux-pm@vger.kernel.org, Geert Uytterhoeven , Kevin Hilman , Tomasz Figa , Kukjin Kim , Philipp Zabel , Sylwester Nawrocki , "Rafael J. Wysocki" , Pavel Machek , Ulf Hansson Subject: [PATCH 7/7] [media] exynos-gsc: Do full clock gating at runtime PM suspend Date: Tue, 14 Oct 2014 09:15:40 +0200 Message-Id: <1413270940-4378-8-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413270940-4378-1-git-send-email-ulf.hansson@linaro.org> References: <1413270940-4378-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=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 e48aefa..e90ba09 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1161,7 +1161,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; @@ -1179,7 +1179,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;