From patchwork Wed Nov 9 14:23:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 81500 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp223189qge; Wed, 9 Nov 2016 06:24:39 -0800 (PST) X-Received: by 10.99.122.92 with SMTP id j28mr15301702pgn.64.1478701479862; Wed, 09 Nov 2016 06:24:39 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si42397398pgh.272.2016.11.09.06.24.39; Wed, 09 Nov 2016 06:24:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754119AbcKIOYg (ORCPT + 4 others); Wed, 9 Nov 2016 09:24:36 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:60632 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753161AbcKIOYQ (ORCPT ); Wed, 9 Nov 2016 09:24:16 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGD0025PPCBHA50@mailout3.w1.samsung.com>; Wed, 09 Nov 2016 14:24:11 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161109142410eucas1p27cd417237b8ecf40276c3b5e3bbd684d~FZyKD57FI0115101151eucas1p22; Wed, 9 Nov 2016 14:24:10 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 5E.39.02283.A8133285; Wed, 9 Nov 2016 14:24:10 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161109142409eucas1p1cb35ebbee01d819417ed2565667e99f9~FZyJXwprb1503715037eucas1p1X; Wed, 9 Nov 2016 14:24:09 +0000 (GMT) X-AuditID: cbfec7f1-f79f46d0000008eb-e5-5823318ad5d3 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 54.CD.10494.C6133285; Wed, 9 Nov 2016 14:23:40 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGD009LGPC36HB0@eusync2.samsung.com>; Wed, 09 Nov 2016 14:24:09 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Ulf Hansson , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas Subject: [PATCH 06/12] exynos-gsc: Do full clock gating at runtime PM suspend Date: Wed, 09 Nov 2016 15:23:55 +0100 Message-id: <1478701441-29107-7-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsWy7djP87pdhsoRBif7RC02zljPavHm7Rom i/PnN7Bb9GzYymox4/w+Jou1R+6yWxx+085qcXxtuAOHx6ZVnWwed67tYfPY0n+X3aNvyypG j8+b5AJYo7hsUlJzMstSi/TtErgyds94wViwkbNi5beljA2Mv9i7GDk5JARMJJ53fmWFsMUk Ltxbz9bFyMUhJLC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YdeQmmC0EVLN1+SzGCYy8 CxgZVjGKpJYW56bnFhvpFSfmFpfmpesl5+duYgSG9bZjP7fsYOx6F3yIUYCDUYmHt0NTOUKI NbGsuDL3EKMEB7OSCO9MA6AQb0piZVVqUX58UWlOavEhRlOgoyYyS4km5wNjLq8k3tDE0NzS 0MjYwsLcyEhJnHfqhyvhQgLpiSWp2ampBalFMH1MHJxSDYxun0/s65l1benvyKUfwuwZNFxZ hb3M/tittjm235Ul01t7KcO9yo271uZkViayPK5fnc8qKaF24KemSK74JPPdznc2T56Rz/Fe +ESDV+8tu4pG74fv2+7preK8oL+LK1Ct3zJOcOlih7KAn9OdL996NMvkqdg69lZVRZ95+5+Y Ryx+dl5dVlSJpTgj0VCLuag4EQDDAtRhgQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161109142409eucas1p1cb35ebbee01d819417ed2565667e99f9 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161109142409eucas1p1cb35ebbee01d819417ed2565667e99f9 X-RootMTR: 20161109142409eucas1p1cb35ebbee01d819417ed2565667e99f9 References: <1478701441-29107-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Ulf Hansson 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 [mszyprow: rebased onto v4.9-rc4] Signed-off-by: Marek Szyprowski --- drivers/media/platform/exynos-gsc/gsc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 1d3bde3..9ba1619 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1141,7 +1141,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; @@ -1159,7 +1159,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;