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: 5078571 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2E3A69F349 for ; Tue, 14 Oct 2014 07:16:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57EF920166 for ; Tue, 14 Oct 2014 07:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88A7520148 for ; Tue, 14 Oct 2014 07:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754683AbaJNHQY (ORCPT ); Tue, 14 Oct 2014 03:16:24 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:59063 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754544AbaJNHQK (ORCPT ); Tue, 14 Oct 2014 03:16:10 -0400 Received: by mail-lb0-f169.google.com with SMTP id 10so7689810lbg.0 for ; Tue, 14 Oct 2014 00:16:08 -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=M7DRaSysYeI3G0gsNCExH597drq3HgQh+rsyYNKtrIZcGZ+VOcf5Zqmkk0bmuuPjZc KUYiNExg7zcnMC0J6hJ6/3TaNzIqtTdJscDDB+qolxM19aJl0dLQb/b7LSRY+HF1F1Eb hagzrhs7CKdknbfXiTnpZPuvY2KpCiLfjiDjD9W5NQpa7JHPbtags39L/y8v1H88HL+1 oKVizjbmrXk1E2rLyM+0Vf/W4HYIB/YErZPV3L3mMTvSMbHZNvNFlE0z2IivUmv7kj9G cR62MCEDePFjRk1me6KJUwML3cKw7DAX/NMpgq8mANxdUVPQkSkonCWl4Ov/E7SC1Q31 GDtw== X-Gm-Message-State: ALoCoQnIFY5qAR9/6Un/esIV0SPcjx7P0U5eVwnDLF+T3FJHEvaugaMEAVvgb8WOlODtsaHh8kHi 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-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 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;