From patchwork Wed Dec 5 11:05:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10713877 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 EC9FB13AF for ; Wed, 5 Dec 2018 11:06:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB22D29B08 for ; Wed, 5 Dec 2018 11:06:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB00B29EB4; Wed, 5 Dec 2018 11:06:51 +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=unavailable 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 74BB729B08 for ; Wed, 5 Dec 2018 11:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727589AbeLELGf (ORCPT ); Wed, 5 Dec 2018 06:06:35 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53305 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbeLELG1 (ORCPT ); Wed, 5 Dec 2018 06:06:27 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110626euoutp02197d16467901f280bf6618d33490eb5a~taxU2UT5e0208602086euoutp02c for ; Wed, 5 Dec 2018 11:06:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181205110626euoutp02197d16467901f280bf6618d33490eb5a~taxU2UT5e0208602086euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007986; bh=UoqIULXgJ33xu2Pnucrdl+LhaphwYeDFo+URJwi4+eU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UeoEo5r0BfL75vuNMLCAr3EQr6SR3t6+hHeXbq233o4HlpTkTnmlXzALaRCEBUxZ9 hpaw88U5abzrBDrFEfbm5zUcwBz9UK+Ao/Pqiu7aHMnNuTAygVXeEyBHkgpEA0wUvP eA1A8h+SYkcwiA1qLqmKLp0OVPIMneqnrtZl/Zsg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181205110624eucas1p1dc94b28256d61bae3fa29ea623c54588~taxTu9Q5l1455014550eucas1p1J; Wed, 5 Dec 2018 11:06:24 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F1.01.04441.031B70C5; Wed, 5 Dec 2018 11:06:24 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181205110623eucas1p120f9d8b38822bf856a5b7d427d00e49f~taxSt2en40100101001eucas1p1z; Wed, 5 Dec 2018 11:06:23 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110623eusmtrp2e175437881f3d90b5017c4fc6cf5c7b9~taxSdgtmo2749027490eusmtrp2k; Wed, 5 Dec 2018 11:06:23 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-85-5c07b130c641 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 77.72.04128.F21B70C5; Wed, 5 Dec 2018 11:06:23 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110622eusmtip196579160a294edb8f08789535970407f~taxRfT13o2314923149eusmtip1V; Wed, 5 Dec 2018 11:06:22 +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 v3 4/5] drivers: power: suspend: call devfreq suspend/resume Date: Wed, 5 Dec 2018 12:05:55 +0100 Message-Id: <1544007956-28889-5-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544007956-28889-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe1BMcRTH/fbufbRjc21GJ4+MNSEzKo/hN8OYjMzcwRiPYQbNZOlOmdrK XkWYsRUlIbOT5G0kZe1KyVZL0sMmvbSi1zAo8koqpZJH11389z3f8/mec+Y3P4ZQ9ZMTmB1h u3hdmCZUTSnkFttg7WyfHNrfJ+2aGpfc9sQ5adkkzs/pJ3Hj1w4SXyyvJXFcejaFq5O0OLnt I4Hr6m7SuCb2E41b9JPwmZQiGc5te0biJ9ZzFO49Vo5wWt09GTaXP6dxRmO9DLfGZFH4+aMH IzOq7CQ+VFRO4/jrX0j86fELuS9wljsWkjNdMCHurL5ezp1I7kFc+t33Mi7XmEhxxedNNHfr ygH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+aUlqQoZ+cUltkrRhhZGeoaWFnpGJpZ6 hsbmsVZGpkr6djYpqTmZZalF+nYJehkfmvMLTnJWrH3fwNrAOImji5GTQ0LAROLJqefsILaQ wFJGiY1fKyHiYhKT9m1nh7CFJf5c62LrYuQCqvnEKLGmdzFTFyMHB5uAnsSOVYUgcRGB5YwS 93/OZgdxmAUeMEt0PN/ECtItLOAjsWTpLWaQBhYBVYkfHx1AwrwCXhKTDv9iglggJ3HzXCcz iM0p4C3R/X8dG8RBXhJT+5czTWDkW8DIsIpRJLW0ODc9t9hIrzgxt7g0L10vOT93EyMwVrcd +7llB2PXu+BDjAIcjEo8vBJT2GKEWBPLiitzDzFKcDArifCusGGPEeJNSaysSi3Kjy8qzUkt PsRoCnTTRGYp0eR8YBrJK4k3NDU0t7A0NDc2NzazUBLnPW9QGSUkkJ5YkpqdmlqQWgTTx8TB KdXAuI7NIIlJde2LT7268/0Sd4RtEpnCbvzV4Lm3bpFvpHlXz/0NP6d/LTvT8u2BdOq6lMPz 1jm8zDnvEmOdqcDOsyCr3nrKG75q58/bln/qvcy13FS/hv26WXvrJRe3+NKghJBHky3fnjLM lW45FbObR9pl68tvf/VZihqi41cr5jZ62ATVp61TYinOSDTUYi4qTgQAqRpYi+sCAAA= X-CMS-MailID: 20181205110623eucas1p120f9d8b38822bf856a5b7d427d00e49f X-Msg-Generator: CA X-RootMTR: 20181205110623eucas1p120f9d8b38822bf856a5b7d427d00e49f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110623eucas1p120f9d8b38822bf856a5b7d427d00e49f References: <1544007956-28889-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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. Suggested-by: Tobias Jakobi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba Acked-by: MyungJoo Ham --- 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);