From patchwork Mon Dec 3 14:31:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10709663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 646F513AF for ; Mon, 3 Dec 2018 14:31:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51D432AF39 for ; Mon, 3 Dec 2018 14:31:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 436E52AF42; Mon, 3 Dec 2018 14:31:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C46DD2AF39 for ; Mon, 3 Dec 2018 14:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbeLCOcv (ORCPT ); Mon, 3 Dec 2018 09:32:51 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:60144 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbeLCOcu (ORCPT ); Mon, 3 Dec 2018 09:32:50 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181203143136euoutp01d547af4d9ee0551d5c279c1a4c39a92c~s2R5DT7OY1512915129euoutp019 for ; Mon, 3 Dec 2018 14:31:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181203143136euoutp01d547af4d9ee0551d5c279c1a4c39a92c~s2R5DT7OY1512915129euoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543847496; bh=XyvB6qv76N9Eb6Xx/D6063pygN/u38E8+8VRq5JHg5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ah868BTSvoo0irHk7DciKVwngz+IMP5oFUMA902KptpR0xIbd2xGP/NLJkLp0W9Ng XxV8LpIXZzm4Fd6TcyWah6UT5ydbf4hTuyPovIbZB9+WiOjxWLoDxI6x2e3rH1RzIc YH6bj7MESiiUoYfwfMdOVcYs8xfSeVzjh7FIQ8v4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181203143135eucas1p2b77246d452e31c5ea4880efc1eb8cb47~s2R38ALYu0427604276eucas1p2f; Mon, 3 Dec 2018 14:31:35 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 42.D1.04294.64E350C5; Mon, 3 Dec 2018 14:31:34 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181203143134eucas1p1edd70b0f4dca115f6f154555d8829427~s2R3NEGvv1908319083eucas1p1b; Mon, 3 Dec 2018 14:31:34 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181203143134eusmtrp1afaec282fc3abdf73a40e467b3ccbbe1~s2R28KDKp1680116801eusmtrp1B; Mon, 3 Dec 2018 14:31:34 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-5a-5c053e465c42 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C4.43.04284.54E350C5; Mon, 3 Dec 2018 14:31:33 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181203143132eusmtip2d0a4832f588c8ce344b70e4187a65528~s2R1-I8w60555005550eusmtip29; Mon, 3 Dec 2018 14:31:32 +0000 (GMT) From: Lukasz Luba To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Cc: tjakobi@math.uni-bielefeld.de, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, gregkh@linuxfoundation.org, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, robh+dt@kernel.org, mark.rutland@arm.com, kgene@kernel.org, krzk@kernel.org, m.szyprowski@samsung.com, b.zolnierkie@samsung.com, Lukasz Luba Subject: [PATCH v2 4/5] drivers: power: suspend: call devfreq suspend/resume Date: Mon, 3 Dec 2018 15:31:14 +0100 Message-Id: <1543847475-7600-5-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543847475-7600-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTURzHO/exex0tbsvyV0bBoIdClhFxKHtBxDUior+sDF110dRN3dXM HuSy1CxTzGqupoaVa64snTaWWk7Tyty06P3AMJBe5ousEGu3a/Xf53zO9/fgcFhSPUjPYHfr UwSDXpugUSiputYfngXrVtKRiz70hOKm2iB8w1RF45s3vtH42XAvjUtbPDTOLK9S4IfHdTi/ 5xOJvd7rDO44/JnBLzNmYnNRA4Gre57S+LHrvAIP5bUgbPI2EvhqyxsGX3rWReBXRqsCv3lw 19ej/RGNjza0MDirsp/GnzvfUquBr7tVR/P2Ejviz2V0UXxB/iDiy+s/EHy17ZiCv22xM3zN xUP8WCvDN/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cUltkrRhhZGeoaWFnpGJpZ6 hsbmsVZGpkr6djYpqTmZZalF+nYJehm9U1YyFzRyVTycJ93AuJeji5GdQ0LARGJWRBcjF4eQ wFJGia+X/zJ2MXIChcUkJu3bzg5hC0v8udbFBlH0iVFi35JtzF2MHBxsAnoSO1YVgsRFBJYz Stz/OZsdxGEWeMAs0fF8EytIkbCAj8S/vZUgg1gEVCXOnT/NBGLzCnhKrP9/C2qBnMTNc53M IDangJfElBXzwWwhoJqWvSuYJzDyLWBkWMUoklpanJueW2yoV5yYW1yal66XnJ+7iREYqduO /dy8g/HSxuBDjAIcjEo8vA7xLDFCrIllxZW5hxglOJiVRHgLCoFCvCmJlVWpRfnxRaU5qcWH GE2BjprILCWanA9MInkl8YamhuYWlobmxubGZhZK4rznDSqjhATSE0tSs1NTC1KLYPqYODil GhgDz74wc+3btujlCQcOnhUZZf1CHXvaMgUXdrT4L18reb1uHnd+mlBav0BsBKuhRXbTe/ud Kzs1v1n2Xfn1NDu6wafcneO/U8+5R9puxn3T1W99a9t689dym1OrArWrQ1IVwz66v4yqfHJw 62ZJCcd3R25cYWwrSDmdsfbRZ1+ZCdZtIlIzvyixFGckGmoxFxUnAgAqUMvi6gIAAA== X-CMS-MailID: 20181203143134eucas1p1edd70b0f4dca115f6f154555d8829427 X-Msg-Generator: CA X-RootMTR: 20181203143134eucas1p1edd70b0f4dca115f6f154555d8829427 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181203143134eucas1p1edd70b0f4dca115f6f154555d8829427 References: <1543847475-7600-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Devfreq framework supports suspend of its devices. Call the the devfreq interface and allow devfreq devices preserve/restore their states during suspend/resume. The patch is based on earlier work by Tobias Jakobi. Suggested-by: Tobias Jakobi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba --- drivers/base/power/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index a690fd4..0992e67 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "../base.h" @@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state) dpm_show_time(starttime, state, 0, NULL); cpufreq_resume(); + devfreq_resume(); trace_suspend_resume(TPS("dpm_resume"), state.event, false); } @@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state) trace_suspend_resume(TPS("dpm_suspend"), state.event, true); might_sleep(); + devfreq_suspend(); cpufreq_suspend(); mutex_lock(&dpm_list_mtx);