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: 38693 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9329B20549 for ; Tue, 14 Oct 2014 07:16:11 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id hi2sf3563175wib.9 for ; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) 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=Dy6drD0zEmNQ9qaqPrXqPz8VeGNoBU4rqXC6rLXdrU0=; b=Qo4Lt+S0XVwb0ME2yq8kN/Ki0V6T+c8pszGWK8hssUaU2/z2eDxvKQUJUmfvjtOEUh HAgMt+xUUzWKCsKj7TDvr4qm5dsRA6IV1wsnO591Ik7Tfbi65XEtNDHuS4reb3tw4HwT 7xKnfCSVvSY4ezI7AzLM1h55ELwcbakOjnDb7hmCDmVHJJBZXzA5YH3erBFUFnvz9e2F uegxeesvMhjcRBy2HienlP8iatRieC3WivO63pYV9bUojdgVVuR5QxdvldW6o2a/zaKL L1vbjXoXMNdhdxv3bLY5rNswQO64Ds5yr7Lln74UC75z6cDHIcePydSxGDMFtiYTzFJZ X0zg== X-Gm-Message-State: ALoCoQlcmnDVyds0yk6b2C1ttAt8vch2HMlIQHcKotJnCiXS5wR6Opoa1uHIK+TURikjEUPqjurm X-Received: by 10.194.242.36 with SMTP id wn4mr178762wjc.4.1413270970805; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.132 with SMTP id c4ls493149lac.88.gmail; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) X-Received: by 10.112.97.236 with SMTP id ed12mr3544697lbb.10.1413270970643; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx.google.com with ESMTPS id pt7si25115870lbb.120.2014.10.14.00.16.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 00:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id p9so7517954lbv.21 for ; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr3447957lbb.46.1413270970559; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) 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.84.229 with SMTP id c5csp345571lbz; Tue, 14 Oct 2014 00:16:10 -0700 (PDT) X-Received: by 10.112.99.136 with SMTP id eq8mr3265307lbb.57.1413270969130; Tue, 14 Oct 2014 00:16:09 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id j14si25217126laa.71.2014.10.14.00.16.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 00:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so7638498lbg.4 for ; Tue, 14 Oct 2014 00:16:09 -0700 (PDT) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) 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 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;