From patchwork Wed Dec 5 11:05:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10713883 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 1A7DA109C for ; Wed, 5 Dec 2018 11:07:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091F829B08 for ; Wed, 5 Dec 2018 11:07:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F018829EB4; Wed, 5 Dec 2018 11:06:59 +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 6A9FE29B08 for ; Wed, 5 Dec 2018 11:06:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727475AbeLELGY (ORCPT ); Wed, 5 Dec 2018 06:06:24 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53258 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727428AbeLELGW (ORCPT ); Wed, 5 Dec 2018 06:06:22 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110621euoutp022e31fc079b072252e22a4c0d133dd5aa~taxQrkITw0210402104euoutp02X for ; Wed, 5 Dec 2018 11:06:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181205110621euoutp022e31fc079b072252e22a4c0d133dd5aa~taxQrkITw0210402104euoutp02X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007981; bh=+yODvpKS+IjtP5C3l9bjxJQaM/H7qM675yl9hgAMjGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8+ffV/ppHjO6/43rWyQAN1cKT/V5V7w28BDRs9OaR1yBHWH+E5en+jLGDbZ03Ho7 wDdWJ6+ejI/8Jo00yrP15ghRQ3kZFVXu76AGIzAHsxTI2H3a0vWaPexunbt7V/eqJX FqjnNvZnEp8fv7TxJRoy9whaSotuvLKUzCf1G3rM= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181205110620eucas1p15fc4603044966460775702120d240470~taxPMuQFG0437604376eucas1p1L; Wed, 5 Dec 2018 11:06:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 6F.F0.04441.B21B70C5; Wed, 5 Dec 2018 11:06:19 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181205110619eucas1p2eb8553c60b4e23b07c76f02b3867827c~taxOa8Dbz1224412244eucas1p2S; Wed, 5 Dec 2018 11:06:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110618eusmtrp2eda2fccddfe42703bc47625d361813ff~taxOK-vWc2724527245eusmtrp2D; Wed, 5 Dec 2018 11:06:18 +0000 (GMT) X-AuditID: cbfec7f2-a1ae89c000001159-7b-5c07b12b1336 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B1.72.04128.A21B70C5; Wed, 5 Dec 2018 11:06:18 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110617eusmtip1b23623fc41618750d47a1122514b8060~taxNS0R-D2482424824eusmtip1B; Wed, 5 Dec 2018 11:06:17 +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 1/5] devfreq: refactor set_target frequency function Date: Wed, 5 Dec 2018 12:05:52 +0100 Message-Id: <1544007956-28889-2-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: H4sIAAAAAAAAA0WSe2xLYRjGfef0XNboctTYm1lImhC12BCLL4hLIhxEiPDPzKXsmMU69OiY CTWms9m6zKZsbKJk1ZVZzVSVpbOtZmY3lyFucYu6hM2ISTY7TvHf73ve532f9/vysaT6BxXB JqVsFwwpumQNrVTUNP5snRhVxcRPulgRg32XtbjqWCWFr1R9p/DDb+8oXFZ/l8L7bZU0vpOj x5ZXH0jc2nqRwS0ZHxn82BSJiwuvE9j16gGFOz0naNyTW4/wsdYbBD5f/5TBZx+2E/jJPjuN n95uGJzR3EHhzOv1DD5Y8YXCH9ueKeYAX3OthuKdpU7El5jaFXy+pRvxNu97gnc5DtF87Ukn w186s5fvb2R432cvwVffNyv4vGoH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hUy8otLbJWiDS2M9AwtLfSMTCz1 DI3NY62MTJX07WxSUnMyy1KL9O0S9DI+Tv3FVDBfoqL101H2BsY1Il2MHBwSAiYSN3d5djFy cQgJLGWU2Dr7CHMXIydQXExi0r7t7BC2sMSfa11sEEWfGCXu9xxnBWlmE9CT2LGqECQuIrAc KP5zNjuIwyzwgFmi4/kmVpBuYQF3iVfPvjKC2CwCqhJPfy8Am8or4CVxcNIrVogNchI3z3WC beYU8Jbo/r+ODcQWAqqZ2r+caQIj3wJGhlWMIqmlxbnpucVGesWJucWleel6yfm5mxiB8brt 2M8tOxi73gUfYhTgYFTi4ZWYwhYjxJpYVlyZe4hRgoNZSYR3hQ17jBBvSmJlVWpRfnxRaU5q 8SFGU6CjJjJLiSbnA1NJXkm8oamhuYWlobmxubGZhZI473mDyighgfTEktTs1NSC1CKYPiYO TqkGxuMeb9M/FaznkjCX63XX8uqx+3H/15Ea58O6WW3+WfKZ9/nqq7+GXflhn+j5+Yatd+TP Qr33ipmeK9adWXHpotOVA+v5eIu4WkpfrPw7uXnhkVLZjKz/C68cczni4VfxZDOX3q+jmxIE cn/JnAh/8XnjVW39dRxRtcWxxhN17Z8ee9Ba3/+hQYmlOCPRUIu5qDgRAOEdxZbtAgAA X-CMS-MailID: 20181205110619eucas1p2eb8553c60b4e23b07c76f02b3867827c X-Msg-Generator: CA X-RootMTR: 20181205110619eucas1p2eb8553c60b4e23b07c76f02b3867827c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110619eucas1p2eb8553c60b4e23b07c76f02b3867827c 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 The refactoring is needed for the new client in devfreq: suspend. To avoid code duplication, move it to the new local function devfreq_set_target. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba Acked-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 62 +++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 1414130..a9fd61b 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -285,6 +285,40 @@ static int devfreq_notify_transition(struct devfreq *devfreq, return 0; } +static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq, + u32 flags) +{ + struct devfreq_freqs freqs; + unsigned long cur_freq; + int err = 0; + + if (devfreq->profile->get_cur_freq) + devfreq->profile->get_cur_freq(devfreq->dev.parent, &cur_freq); + else + cur_freq = devfreq->previous_freq; + + freqs.old = cur_freq; + freqs.new = new_freq; + devfreq_notify_transition(devfreq, &freqs, DEVFREQ_PRECHANGE); + + err = devfreq->profile->target(devfreq->dev.parent, &new_freq, flags); + if (err) { + freqs.new = cur_freq; + devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); + return err; + } + + freqs.new = new_freq; + devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); + + if (devfreq_update_status(devfreq, new_freq)) + dev_err(&devfreq->dev, + "Couldn't update frequency transition information.\n"); + + devfreq->previous_freq = new_freq; + return err; +} + /* Load monitoring helper functions for governors use */ /** @@ -296,8 +330,7 @@ static int devfreq_notify_transition(struct devfreq *devfreq, */ int update_devfreq(struct devfreq *devfreq) { - struct devfreq_freqs freqs; - unsigned long freq, cur_freq, min_freq, max_freq; + unsigned long freq, min_freq, max_freq; int err = 0; u32 flags = 0; @@ -333,31 +366,8 @@ int update_devfreq(struct devfreq *devfreq) flags |= DEVFREQ_FLAG_LEAST_UPPER_BOUND; /* Use LUB */ } - if (devfreq->profile->get_cur_freq) - devfreq->profile->get_cur_freq(devfreq->dev.parent, &cur_freq); - else - cur_freq = devfreq->previous_freq; - - freqs.old = cur_freq; - freqs.new = freq; - devfreq_notify_transition(devfreq, &freqs, DEVFREQ_PRECHANGE); + return devfreq_set_target(devfreq, freq, flags); - err = devfreq->profile->target(devfreq->dev.parent, &freq, flags); - if (err) { - freqs.new = cur_freq; - devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); - return err; - } - - freqs.new = freq; - devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); - - if (devfreq_update_status(devfreq, freq)) - dev_err(&devfreq->dev, - "Couldn't update frequency transition information.\n"); - - devfreq->previous_freq = freq; - return err; } EXPORT_SYMBOL(update_devfreq); From patchwork Wed Dec 5 11:05:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10713885 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 0F3A113AF for ; Wed, 5 Dec 2018 11:07:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3AA329B08 for ; Wed, 5 Dec 2018 11:07:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5C722A4B5; Wed, 5 Dec 2018 11:07:00 +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 670A729B08 for ; Wed, 5 Dec 2018 11:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbeLELG7 (ORCPT ); Wed, 5 Dec 2018 06:06:59 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53285 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727452AbeLELGY (ORCPT ); Wed, 5 Dec 2018 06:06:24 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110622euoutp02c640ba8a3490b2437cb7669a3bd5098c~taxR5TA1a0312203122euoutp02b for ; Wed, 5 Dec 2018 11:06:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181205110622euoutp02c640ba8a3490b2437cb7669a3bd5098c~taxR5TA1a0312203122euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007982; bh=RttaSuYsdrhZVNquhEdaCMsC9uRDqEtNN9PxfKoRjA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oz+LRLzTFGqcJdBOL9+evNX/REFY0m8eFE6iEb2Lfi88gQEwDcGarM5Yug1iYFxGf STjgZSEmDbkxrFPmiCHUJk9vBmYopI9sSSDtlTWFmB+gmjrt5xD93kzzDzRnkXypnP WsxjMGNGq2415ZA3tXAXK62InvPa5XG1TAg4DIIw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181205110621eucas1p154269306679bdae7a4ebd38971834ead~taxQznU7X1455414554eucas1p1K; Wed, 5 Dec 2018 11:06:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 54.AB.04806.D21B70C5; Wed, 5 Dec 2018 11:06:21 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181205110620eucas1p14de70dc092580b684a0304b5ce771605~taxQAL0V11457014570eucas1p1D; Wed, 5 Dec 2018 11:06:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110620eusmtrp2a41be8a87e68ac1d977d5f549b9accb2~taxPwb_uB2749027490eusmtrp2i; Wed, 5 Dec 2018 11:06:20 +0000 (GMT) X-AuditID: cbfec7f5-79db79c0000012c6-4c-5c07b12da7d1 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F3.72.04128.C21B70C5; Wed, 5 Dec 2018 11:06:20 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110619eusmtip1bf8b9d1eb7ba11c3e19d535702fb78e0~taxO0knQl2314923149eusmtip1U; Wed, 5 Dec 2018 11:06:19 +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 2/5] devfreq: add support for suspend/resume of a devfreq device Date: Wed, 5 Dec 2018 12:05:53 +0100 Message-Id: <1544007956-28889-3-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: H4sIAAAAAAAAA0VSfUyMcRz3e95rrj0u4yepdmiylQzbz4ox/njG1mz4A7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SWpSXmKPExsVy+t/xu7o6G9ljDI59VbE4uFXTYuOM9awW 2zd+Y7W4/uU5q8X8I+dYLZoXr2ezONOda9H/+DWzxfnzG9gtzja9Ybe41SBjMWvKXiaLTY+v sVpc3jWHzeJz7xFGixnn9zFZrD1yl91i6fWLTBa3G1ewWdw9dRRoxulLrBate4+wW7St/sBq 8ebCPRYHCY9tu7exeqyZt4bRY3bDRRaPCf2fGD0W73nJ5LFpVSebx/65a9g9Ni+p9/h3jN3j 4Ls9TB5brrazePRtWcXosWL1d3aPz5vkAvii9GyK8ktLUhUy8otLbJWiDS2M9AwtLfSMTCz1 DI3NY62MTJX07WxSUnMyy1KL9O0S9DJ2LVnCWLBFvmLjmtusDYyfJbsYOTkkBEwkTu16ytTF yMUhJLCUUeJR6wt2iISYxKR926FsYYk/17rYIIo+MUr8erKAuYuRg4NNQE9ix6pCkLiIwHJG ifs/Z7ODOMwCD5glOp5vYgXpFhYIljhw9TWYzSKgKjHl+n8mEJtXwEvi3YoHTBAb5CRunutk BrE5Bbwluv+vYwOxhYBqpvYvZ5rAyLeAkWEVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYMRu O/Zzyw7GrnfBhxgFOBiVeHglprDFCLEmlhVX5h5ilOBgVhLhXWHDHiPEm5JYWZValB9fVJqT WnyI0RToqInMUqLJ+cBkklcSb2hqaG5haWhubG5sZqEkznveoDJKSCA9sSQ1OzW1ILUIpo+J g1OqgZHLpfdQmKbpc46Ky1Me3rpsdKJoZeGdwiSelb+u3dix7f7bqhiTd73b7K4IHo3WiHZ9 GDRNXrLq2m9D045ty+4LtBw538vI7rHpgnGJ8WTJJinLpBP9oXuCDmekZ0xIX3WhxslU6mfm P1HWOO6b3EdM1x8+0cj57kSGzKJNDzdeKpHXnZtdmKHEUpyRaKjFXFScCABy7U1o7gIAAA== X-CMS-MailID: 20181205110620eucas1p14de70dc092580b684a0304b5ce771605 X-Msg-Generator: CA X-RootMTR: 20181205110620eucas1p14de70dc092580b684a0304b5ce771605 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110620eucas1p14de70dc092580b684a0304b5ce771605 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 The patch prepares devfreq device for handling suspend/resume functionality. The new fields will store needed information during this process. Devfreq framework handles opp-suspend DT entry and there is no need of modyfications in the drivers code. It uses atomic variables to make sure no race condition affects the process. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Signed-off-by: Lukasz Luba Reviewed-by: Chanwoo Choi Acked-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 47 +++++++++++++++++++++++++++++++++++++++++------ include/linux/devfreq.h | 7 +++++++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index a9fd61b..46517b6 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -316,6 +316,10 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq, "Couldn't update frequency transition information.\n"); devfreq->previous_freq = new_freq; + + if (devfreq->suspend_freq) + devfreq->resume_freq = cur_freq; + return err; } @@ -667,6 +671,9 @@ struct devfreq *devfreq_add_device(struct device *dev, } devfreq->max_freq = devfreq->scaling_max_freq; + devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev); + atomic_set(&devfreq->suspend_count, 0); + dev_set_name(&devfreq->dev, "devfreq%d", atomic_inc_return(&devfreq_no)); err = device_register(&devfreq->dev); @@ -867,14 +874,28 @@ EXPORT_SYMBOL(devm_devfreq_remove_device); */ int devfreq_suspend_device(struct devfreq *devfreq) { + int ret; + if (!devfreq) return -EINVAL; - if (!devfreq->governor) + if (atomic_inc_return(&devfreq->suspend_count) > 1) return 0; - return devfreq->governor->event_handler(devfreq, - DEVFREQ_GOV_SUSPEND, NULL); + if (devfreq->governor) { + ret = devfreq->governor->event_handler(devfreq, + DEVFREQ_GOV_SUSPEND, NULL); + if (ret) + return ret; + } + + if (devfreq->suspend_freq) { + ret = devfreq_set_target(devfreq, devfreq->suspend_freq, 0); + if (ret) + return ret; + } + + return 0; } EXPORT_SYMBOL(devfreq_suspend_device); @@ -888,14 +909,28 @@ EXPORT_SYMBOL(devfreq_suspend_device); */ int devfreq_resume_device(struct devfreq *devfreq) { + int ret; + if (!devfreq) return -EINVAL; - if (!devfreq->governor) + if (atomic_dec_return(&devfreq->suspend_count) >= 1) return 0; - return devfreq->governor->event_handler(devfreq, - DEVFREQ_GOV_RESUME, NULL); + if (devfreq->resume_freq) { + ret = devfreq_set_target(devfreq, devfreq->resume_freq, 0); + if (ret) + return ret; + } + + if (devfreq->governor) { + ret = devfreq->governor->event_handler(devfreq, + DEVFREQ_GOV_RESUME, NULL); + if (ret) + return ret; + } + + return 0; } EXPORT_SYMBOL(devfreq_resume_device); diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index e4963b0..d985199 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -131,6 +131,9 @@ struct devfreq_dev_profile { * @scaling_min_freq: Limit minimum frequency requested by OPP interface * @scaling_max_freq: Limit maximum frequency requested by OPP interface * @stop_polling: devfreq polling status of a device. + * @suspend_freq: frequency of a device set during suspend phase. + * @resume_freq: frequency of a device set in resume phase. + * @suspend_count: suspend requests counter for a device. * @total_trans: Number of devfreq transitions * @trans_table: Statistics of devfreq transitions * @time_in_state: Statistics of devfreq states @@ -167,6 +170,10 @@ struct devfreq { unsigned long scaling_max_freq; bool stop_polling; + unsigned long suspend_freq; + unsigned long resume_freq; + atomic_t suspend_count; + /* information for device frequency transition */ unsigned int total_trans; unsigned int *trans_table; From patchwork Wed Dec 5 11:05:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10713869 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 BAB29109C for ; Wed, 5 Dec 2018 11:06:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8F8E29C77 for ; Wed, 5 Dec 2018 11:06:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BE1529FE9; Wed, 5 Dec 2018 11:06:28 +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 2719729C77 for ; Wed, 5 Dec 2018 11:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727541AbeLELG0 (ORCPT ); Wed, 5 Dec 2018 06:06:26 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53304 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727500AbeLELG0 (ORCPT ); Wed, 5 Dec 2018 06:06:26 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110624euoutp0218abc90f84a6cdf095f104aa126162e1~taxTZjyyp0355203552euoutp02F for ; Wed, 5 Dec 2018 11:06:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181205110624euoutp0218abc90f84a6cdf095f104aa126162e1~taxTZjyyp0355203552euoutp02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007984; bh=LRlOYMeWZ4Pn6LNSpHnLb7js4tkMWar/hUEOf/knVcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EbJtxlwQ46yHFQHSB2LJomkM0zLImQ+AtocZdAoPJCYBrFLgMb2Z2UqdcCkuoOYV/ 6cX2lVm0Z7CH+2dTLEgVEz6ZeBbZmv5dnSlaW6sJO0AVQ1ls6/6LuG0NDt8eI6knmr 6meO9oI9J6i1CQbfe4rz3l37f5b0nqHn2N/ZlbEA= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181205110623eucas1p1953f6d4a55bbf236020e3e50336a975f~taxSIydaK0438704387eucas1p1Q; Wed, 5 Dec 2018 11:06:23 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 73.2A.04294.E21B70C5; Wed, 5 Dec 2018 11:06:22 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181205110622eucas1p23d788afd54ad34c0a2663efac8734648~taxRUAd5X1232912329eucas1p2c; Wed, 5 Dec 2018 11:06:22 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110622eusmtrp29f0b1cca9862b24b4f8233baf824657b~taxREDk7J2724527245eusmtrp2H; Wed, 5 Dec 2018 11:06:22 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-2d-5c07b12e4886 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E5.72.04128.D21B70C5; Wed, 5 Dec 2018 11:06:21 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110621eusmtip1224f767f833b11470b6ca303950e2723~taxQJBHz52561925619eusmtip1Z; Wed, 5 Dec 2018 11:06:21 +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 3/5] devfreq: add devfreq_suspend/resume() functions Date: Wed, 5 Dec 2018 12:05:54 +0100 Message-Id: <1544007956-28889-4-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: H4sIAAAAAAAAA0WSe1BMYRjGfefsuRTLsTX1Dg1jjUuGJI35GsZtMg5mqMYfhmbYdCbUruwR SsitK8qli1DG0mUta7e1ssSUVYRWoiVlmzLjblI7LjMGu07Gf7/veZ/ne9755mNJhZsaxW7U bBW0GlWSkvaVWRt/tEwLMTGxoSWmmbj+ajA2lRgpfM30lcJO9xsKl9tbKLxfZ6Txwzw1zu/9 QGKH4wqDH+37yOCOjCBceqKOwObedgq32U7TeOCwHeESxy0CX7J3MfiCs5XAL/dW0bir+a7n jgdPKHywzs7gzIt9FP74+JVsPvDWG1aKN5QZEH8qo1XGF+T3I1538x3Bm/U5NH/7jIHha87v 4X81Mnz955sEb3mWJeOPWPSIr7r4jeEHzGOihq/2nRMvJG3cJminz13nu8FlqUbJNYE72gtO kRmo0S8X+bDAhYO7po/wsoKrQuDKS8xFvh52I6gp6iSlww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n1sZgKx hQSWMkq0dJdDxMUkJu3bzg5hC0v8udbF1sXIBVTziVFiUuMj5i5GDg42AT2JHasKQeIiAssZ Je7/nM0O4jALPGCW6Hi+iRWkW1jAXeJlzzKwSSwCqhJtLRPA4rwCXhKL/yxjhdggJ3HzXCcz iM0p4C3R/X8dG8RFXhJT+5czTWDkW8DIsIpRJLW0ODc9t9hIrzgxt7g0L10vOT93EyMwXrcd +7llB2PXu+BDjAIcjEo8vBJT2GKEWBPLiitzDzFKcDArifCusGGPEeJNSaysSi3Kjy8qzUkt PsRoCnTURGYp0eR8YCrJK4k3NDU0t7A0NDc2NzazUBLnPW9QGSUkkJ5YkpqdmlqQWgTTx8TB KdXAGJZR91lW8kOGSXV0p8nGu4aaqR3HjTjjjk2cuHiWsrvfxTfTdTZubtkXuMHX2IZJMi6H TSD1bEy7xbyjgr8nCK3LDeuc/mVN9YNjkxvU/PY2ZFVoa695dPDMwugwmVvmLzSNj32z4C3a G33knu45txYrEfltG16+q/Myb8/+W7pQ4eiym1Y8SizFGYmGWsxFxYkAcIb/HO0CAAA= X-CMS-MailID: 20181205110622eucas1p23d788afd54ad34c0a2663efac8734648 X-Msg-Generator: CA X-RootMTR: 20181205110622eucas1p23d788afd54ad34c0a2663efac8734648 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110622eucas1p23d788afd54ad34c0a2663efac8734648 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 This patch adds implementation for global suspend/resume for devfreq framework. System suspend will next use these functions. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Signed-off-by: Lukasz Luba Reviewed-by: Chanwoo Choi Acked-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/devfreq.h | 6 ++++++ 2 files changed, 50 insertions(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 46517b6..0ae3de7 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -935,6 +935,50 @@ int devfreq_resume_device(struct devfreq *devfreq) EXPORT_SYMBOL(devfreq_resume_device); /** + * devfreq_suspend() - Suspend devfreq governors and devices + * + * Called during system wide Suspend/Hibernate cycles for suspending governors + * and devices preserving the state for resume. On some platforms the devfreq + * device must have precise state (frequency) after resume in order to provide + * fully operating setup. + */ +void devfreq_suspend(void) +{ + struct devfreq *devfreq; + int ret; + + mutex_lock(&devfreq_list_lock); + list_for_each_entry(devfreq, &devfreq_list, node) { + ret = devfreq_suspend_device(devfreq); + if (ret) + dev_err(&devfreq->dev, + "failed to suspend devfreq device\n"); + } + mutex_unlock(&devfreq_list_lock); +} + +/** + * devfreq_resume() - Resume devfreq governors and devices + * + * Called during system wide Suspend/Hibernate cycle for resuming governors and + * devices that are suspended with devfreq_suspend(). + */ +void devfreq_resume(void) +{ + struct devfreq *devfreq; + int ret; + + mutex_lock(&devfreq_list_lock); + list_for_each_entry(devfreq, &devfreq_list, node) { + ret = devfreq_resume_device(devfreq); + if (ret) + dev_warn(&devfreq->dev, + "failed to resume devfreq device\n"); + } + mutex_unlock(&devfreq_list_lock); +} + +/** * devfreq_add_governor() - Add devfreq governor * @governor: the devfreq governor to be added */ diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index d985199..fbffa74 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -205,6 +205,9 @@ extern void devm_devfreq_remove_device(struct device *dev, extern int devfreq_suspend_device(struct devfreq *devfreq); extern int devfreq_resume_device(struct devfreq *devfreq); +extern void devfreq_suspend(void); +extern void devfreq_resume(void); + /** * update_devfreq() - Reevaluate the device and configure frequency * @devfreq: the devfreq device @@ -331,6 +334,9 @@ static inline int devfreq_resume_device(struct devfreq *devfreq) return 0; } +static inline void devfreq_suspend(void) {} +static inline void devfreq_resume(void) {} + static inline struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags) { 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+VFR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qpPNY//cNewem5fUe/w7xu5x 8N0eJo8tV9tZPPq2rGL0WLH6O7vH501yAXxRejZF+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); From patchwork Wed Dec 5 11:05:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10713873 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 9C367109C for ; Wed, 5 Dec 2018 11:06:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D05B29B08 for ; Wed, 5 Dec 2018 11:06:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 813762A4B5; Wed, 5 Dec 2018 11:06:35 +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 0474329B08 for ; Wed, 5 Dec 2018 11:06:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727568AbeLELG3 (ORCPT ); Wed, 5 Dec 2018 06:06:29 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43990 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbeLELG3 (ORCPT ); Wed, 5 Dec 2018 06:06:29 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110627euoutp0148ae39ca5dcd631fcb4b5034166f09af~taxWFYXFg1367813678euoutp01T for ; Wed, 5 Dec 2018 11:06:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181205110627euoutp0148ae39ca5dcd631fcb4b5034166f09af~taxWFYXFg1367813678euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007987; bh=yHjclQEFD6YZMbzKTlG0nEejpZttIshoVnBmSaCyCpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=icpBkkbubKm4TJhBdTOuLvJ+N+TLIYo8MZrLUTyq9nP4PNucGCgbHG0QLDhEOt2Qw tYksgS1KobVT90ysC66DNz6qQncqdajcQq9BYDWzwqqrtYqx03kZ9q2PM5QWonZq99 Bbd6MKi4fyNJ93szGUgUmaegKgDukQKHsmKfOYCk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181205110626eucas1p12f47ff506e871191f7e95525ce7223d4~taxU7tiPy1455014550eucas1p1L; Wed, 5 Dec 2018 11:06:26 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 95.2A.04294.131B70C5; Wed, 5 Dec 2018 11:06:25 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181205110625eucas1p10c7b3137fb77ae51a211c4f040c4eb6f~taxUHzZjp1456514565eucas1p1J; Wed, 5 Dec 2018 11:06:25 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110625eusmtrp208d0f5609fa2e5dc3de577ee1b203e92~taxT3Lheq2749027490eusmtrp2l; Wed, 5 Dec 2018 11:06:25 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-33-5c07b131f44b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 49.72.04128.031B70C5; Wed, 5 Dec 2018 11:06:24 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110624eusmtip14ac0690a7b5fafe9097feabf419f624b~taxS63r1P2535525355eusmtip1V; Wed, 5 Dec 2018 11:06:24 +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 5/5] arm: dts: exynos4: opp-suspend in DMC and leftbus Date: Wed, 5 Dec 2018 12:05:56 +0100 Message-Id: <1544007956-28889-6-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: H4sIAAAAAAAAA0WSbUhTYRTHe3Z3X1xNbjPrkFI0CDNQ0/zwQBpFfrgZUVGfSqhVN62c2a6z N6OV5GtpSG+omWDhmlPbUjNNUzOtTOeyfCsrsJBcRepFEYbm9a769jv/8z/n/xx4GEIzSS5n jiYk8YYEXbyWUilr2qYdQaE2OmZd/WQ4bq4OxLbblSR+bJskcZ84QuK7rV0kTi2ppPCbbD3O HXYR2OF4SOPOSz9oPGjyx/nXGxTYPtxL4p66QgpPXG1F+LajUYHLW4dofL/PqcAfLpopPPT6 xdyOjrckvtzQSuO0st8k/tH9SbkJuJr6GpKzFlkRV2ByKrlrueOIK3n6XcHZLZkU9+yOleYe 3bvAzbTRXPOvpwqu6n26ksupsiDOXDZFcxP2FTu996oiDvPxR5N5Q8jGA6q4rm92MvHSwtMD UyO0CfUxWciLATYcCsQCMgupGA1rRvD9wQdCLkQEtnGrp5hAcKt8eM7GzI9kpW2W9VIEs6n1 9L+JvOkpJJkoNhhqLSeliCVsCYK3tYGSh2BfElA3lqeQGj7sVsjKF0mJlexq6PhdTEmsZqPB 4Sqk5fetgIGuTEJiL3YbZM9WUNIiYB8wMF3sQrIpCh6WFpIy+8Boe5Vn2B9mn9xVyCxAZ4aF kjkF0l/Vejwb4Hm7c/4ygg2EyroQWd4MbnGGkA/2hv6fiyWZmMO8mlseWQ0ZaRrZvQaqrnR7 gpZCqfWmZzkHOT3l86xhixCITYHX0Mr8/1nFCFnQMt4o6GN5ISyBPxUs6PSCMSE2+NAJvR3N /caOmXaxFtW5D7YglkHaRWq4TsVoSF2ycEbfgoAhtEvU5gg6RqM+rDtzljec2G8wxvNCC/Jj lNpl6nMLvuzTsLG6JP44zyfyhr9dBeO13ISM5vXGr66+T4t8U/tvqCZCPoedfJcd3Zu/s2fL r7zuxo/Puga2ZVw8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7hUTHi4I rjs6+9h1E8sb8csL21pdvmtdVl4R/7ZMsHj6W9U91kosxRmJhlrMRcWJAOagR8jtAgAA X-CMS-MailID: 20181205110625eucas1p10c7b3137fb77ae51a211c4f040c4eb6f X-Msg-Generator: CA X-RootMTR: 20181205110625eucas1p10c7b3137fb77ae51a211c4f040c4eb6f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110625eucas1p10c7b3137fb77ae51a211c4f040c4eb6f 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 Mark the state for devfreq device while entring suspend/resume process. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos4210.dtsi | 2 ++ arch/arm/boot/dts/exynos4412.dtsi | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index b6091c2..4429b72 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -298,6 +298,7 @@ opp-400000000 { opp-hz = /bits/ 64 <400000000>; opp-microvolt = <1150000>; + opp-suspend; }; }; @@ -367,6 +368,7 @@ }; opp-200000000 { opp-hz = /bits/ 64 <200000000>; + opp-suspend; }; }; }; diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index 51f72f0..908c0c4 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi @@ -432,6 +432,7 @@ opp-400000000 { opp-hz = /bits/ 64 <400000000>; opp-microvolt = <1050000>; + opp-suspend; }; }; @@ -520,6 +521,7 @@ opp-200000000 { opp-hz = /bits/ 64 <200000000>; opp-microvolt = <1000000>; + opp-suspend; }; };