Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7018292imu; Mon, 3 Dec 2018 06:32:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFWZYm71hWlIhVUHI60RkbCgYkCWxUrS6Zk884woTD8di+4E1ULGp1tHsxMHlC/oKU7k8w X-Received: by 2002:a63:6782:: with SMTP id b124mr13606255pgc.151.1543847568588; Mon, 03 Dec 2018 06:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543847568; cv=none; d=google.com; s=arc-20160816; b=OHyqUqdfM/jLlpkYfvFoLXQjlSmj/vy55iGQ+uuiGmSxEHtUvxGgHYOsLTi0ydOlbX LZhiCvRW0pQiqVAyHYqNZIOCh0b9Qh2QrcmQ8/8vzOfuJk8eutMSOijdmwuBMp40TdN5 zZGHwuhFFFKMUMsN7QkR/mtqEHgrmiKM5RgmIzkQli9OhPwx5LjL1KA/Wr+gpB7N4SlD zy1zZlLT5id7ZuIz/y7/VymD7vukGUWEfqIEQGnrvuOCoYVrf/NbNxY0xUdHChvnormd XuBuDqfBktv59AE6RbiE/tz4f9yW+mZn9grvpXb+H8Dw1CXA/RjpY74wZ03n/pyGSUJC oQ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=XyvB6qv76N9Eb6Xx/D6063pygN/u38E8+8VRq5JHg5o=; b=HCArdNSlfHl3JmQxCkL92k723jwkiB3a2OJYsVJlx2nLkVoFc84LnCA3A7URGSHMnu ugNJ3Z+f9V1iSdAL6l+Xb+FLGbBqH72hMF25XRiSXmD3igFjlHMIOt4Ew9hpGH9pTGeC 4+hPsz04aVPYVBqZutp8Iwq4lKiet8pswkFalfkPIqA99x42Qi6sbqHtQFz0Bqrd+ICK sh7uMRlP7BAD2O5sQn9GWs3Bx3hl60Kbd7ywcgthslShRLZvQghIzuwiq/crJNPkzxP5 dmw6JhyswdS0BbmojLRj7j9sKOqGq4V6kxFt98N2yPLyDhlt4NBYKYgSEVEBHdLYBJzz FGHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ah868BTS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si11905327pld.374.2018.12.03.06.32.33; Mon, 03 Dec 2018 06:32:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ah868BTS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbeLCOcx (ORCPT + 99 others); Mon, 3 Dec 2018 09:32:53 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:47673 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbeLCOcv (ORCPT ); Mon, 3 Dec 2018 09:32:51 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181203143136euoutp0298daf1c3110cc17895efea2a66bb2684~s2R5DSYYe0635506355euoutp02Y for ; Mon, 3 Dec 2018 14:31:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181203143136euoutp0298daf1c3110cc17895efea2a66bb2684~s2R5DSYYe0635506355euoutp02Y 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/XVE7zjSTbFn3TYEG+tHGH4oepZmyZtVYbtEhJ27xEMC1dGK2Pziq6QSUbl3ncl gRmogc1FfixwS+BV/ktG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ARGJWRBcjF4eQ 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 Content-Type: text/plain; charset="utf-8" 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.7.4