Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9332857imu; Wed, 5 Dec 2018 03:07:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/VJO9g/ER1OL1VgDHLvgL1nsz200yAUxe8IHleYGg2JBS047bYNRZ2Kv8k4QvlsKRZxdQGd X-Received: by 2002:a62:4255:: with SMTP id p82mr23611871pfa.13.1544008034220; Wed, 05 Dec 2018 03:07:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544008034; cv=none; d=google.com; s=arc-20160816; b=sWfwUFKqv5CotkNW+9MsJaReaxHPO7kawcwvU0KVkk6KgRpm5mGPR3i3AebDUbNQco w538X0ZgLbSmbzs+tAUdMU7YaNBME+YSsIvEmX8FUcSr0n/+WfmfLgZWQB4NWYqGrCdj PD8XDk5rGw8UjHJ2aSLxfNxqSGuR47p8lCH8BSqgJzIlslnGOGgQC/ospTnqSs6p25Wy 06aeTm+lHDbJcZYRzJBMQil4E5IqbFKX+f6HEb6V0XIoIURaxQ7f6yIS+Gg4nn8z0vIw pjtxT2q2zJXYMVUnPh/hmpXYSerce3IaV4n+PAoWUqJ5ZXSLbZe697cAMxa1peokh+bT vqNg== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=5YbI0/sdABJonddxc7tqFUe+sKRZeu5VTL1AAqyvtrU=; b=mrllITd2jEzv6rmYoRwYh7noGA6yHx6nbfGPcKcU88StTBeYSZg18lISrQjAzI4ORF ntiRYtfmYI4cHkLJoHO7nXuoymvJK0DmaZdS41RRgWEVHan1tHOQmMVbjAuTzWfEn1G/ 48L2y41vlSpwuWNSWh3pwEWcbMw9Dg8F54mUMkh7osb4J3+cCQP4YFwb9RCOTUrcP/IB bf7UZtDB57BNP8zU0doA9lo4yclLyzSQnC3iBU8iKqAQlh0hzFEaRAsA64V3cfl+YGtE L2H1AsmyuZwnDNoVeLSIhbP8x3EVF3yTD6Z+rX5z/+KUlWQA1/HFy180c/i44KtsPqIv omQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=pS7afGsp; 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 j193si17811926pge.332.2018.12.05.03.06.58; Wed, 05 Dec 2018 03:07:14 -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=pS7afGsp; 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 S1727358AbeLELGV (ORCPT + 99 others); Wed, 5 Dec 2018 06:06:21 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43861 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbeLELGU (ORCPT ); Wed, 5 Dec 2018 06:06:20 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181205110618euoutp0199a9df5fee179a23952fd688e14d33a4~taxN9Qwla1418914189euoutp01Y for ; Wed, 5 Dec 2018 11:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181205110618euoutp0199a9df5fee179a23952fd688e14d33a4~taxN9Qwla1418914189euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1544007978; bh=5YbI0/sdABJonddxc7tqFUe+sKRZeu5VTL1AAqyvtrU=; h=From:To:Cc:Subject:Date:References:From; b=pS7afGspQ2yP4ZSa7Or9RyiDeu4hsB6EUzLJjPkzB06A3go33QVbzCCHOMLIhKnQC HIbxPR0ERUJS6jn43IxtmV0xOoSpbcFvCpYIev0Kwj2Sua8Xuo0iyZhlW7bBIyifom wgXQy4D2zvLRkjTfBIBuuK2tZGOYtquLn025DdEw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181205110617eucas1p2303f3342cebba238c2b79dfe8a41d9c2~taxM1j9Y81015510155eucas1p22; Wed, 5 Dec 2018 11:06:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 6B.F0.04441.921B70C5; Wed, 5 Dec 2018 11:06:17 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181205110616eucas1p1e0e17b0c6a96c3b6d77516d4b02de8b1~taxL-5N9q0443104431eucas1p1G; Wed, 5 Dec 2018 11:06:16 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181205110616eusmtrp2a40ea9b4bda1f199da13e76ba2ddd1f7~taxLv-K5m2749027490eusmtrp2Z; Wed, 5 Dec 2018 11:06:16 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-70-5c07b129fa47 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 6D.62.04128.821B70C5; Wed, 5 Dec 2018 11:06:16 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181205110615eusmtip10a184f8a03b45dd74c0519875c2aa70c~taxK3AI4W2561625616eusmtip1f; Wed, 5 Dec 2018 11:06:15 +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 0/5] devfreq: handle suspend/resume Date: Wed, 5 Dec 2018 12:05:51 +0100 Message-Id: <1544007956-28889-1-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA0VSeUiTcRje77uVZp9L6u1AaCA0STsw+0F2QdFXUAT9E2XUqs8VuWn70rLL ZaRrWeo61LKMrJzzymVzrnXMVqvMm7KDIgnpskuzKKTya4v+e97neJ/3j5cjVe/ocdxmwzbR aNAmq5lQynnnR1uMpo5NnPrTNQJ7r2hwXVEtjRvqvtG4++trGpf6Wmm8v6yWwQ8O6XHeq/ck bmu7xOKWrD4WPzVNwCePXSOw49UjGne5Sxg8cNiHcFHbdQJX+56z+EJ3B4Gf7bMx+Pn928M7 mjtpfOCaj8XZlZ9p3Nf+gpoHgvOqkxaqzlQh4ZSpgxLy8/qRUOZ5SwgO+0FGuHG6ihUun88U ft1hBe9HDyHUP8yhhCP1diTYKr+zwoAjcnnYqtCEjWLy5nTROGXOutBNWYN+ItUXvsO9r4Ix IVuYBYVwwMeBp2aIsKBQTsXbEFTe2M8Ghq8Iai19TGAYQFBd3EP+i7w94gwK5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FVPOJUaLp0WvGLkYODjYBPYkdqwpB4iICyxkl 7v+czQ7iMAs8YJboeL6JFaRIWMBM4lKDK8ggFgFViZ03PjGB2LwCXhJ72o8zQSyQk7h5rpN5 AiPPAkaGVYwiqaXFuem5xUZ6xYm5xaV56XrJ+bmbGIHRt+3Yzy07GLveBR9iFOBgVOLhlZjC FiPEmlhWXJl7iFGCg1lJhHeFDXuMEG9KYmVValF+fFFpTmrxIUZToOUTmaVEk/OBiSGvJN7Q 1NDcwtLQ3Njc2MxCSZz3vEFllJBAemJJanZqakFqEUwfEwenVAOjhUON+EfRDQLs5vOl41vk ti3iTH5yh+/Gf7k1ZheVX0xo4dio+uPz22sf/i7YP02c7xbzZYXiC94J80zauluuTXnn035j xd2EE1pMfkv139gr39c4/euqZn2Tdq4b2zWBBZ2bajKqE/RPiy0olu8LWGxk9t2+6mP1dH/v M1JyMb+F3s1f0N6nxFKckWioxVxUnAgAiOPxsdQCAAA= X-CMS-MailID: 20181205110616eucas1p1e0e17b0c6a96c3b6d77516d4b02de8b1 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181205110616eucas1p1e0e17b0c6a96c3b6d77516d4b02de8b1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181205110616eucas1p1e0e17b0c6a96c3b6d77516d4b02de8b1 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This v3 patch set aims to address the issue with devfreq devices' frequency during suspend/resume. It extends suspend/resume by calls to Devfreq framework. In the devfreq framework there is a small refactoring to avoid code duplication in changging frequency (patch 1) and there are extensions for suspending devices. The suspending device has now chance to set proper state when the system is going for suspend. This phase is the right place to set needed frequences for the next resume process. It has been tested on Odroid u3 with Exynos 4412. The patch set draws on Tobias Jakobi's work posted ~2 years ago, who tried to solve issue with devfreq device's frequency during suspend/resume. During the discussion on LKML some corner cases and comments appeared related to the design. This patch set address them keeping in mind suggestions from Chanwoo Choi. Tobias's paches: https://www.spinics.net/lists/linux-samsung-soc/msg56602.html Changes: v3: - cleaned commit messages according to Chanwoo's comments - moved atomic operation to beggining of function in devfreq_{suspend|resume}_device() - changed dev_warn() to dev_err() with also new error message, when devfreq_{suspend|resume}() failed v2: - refactored patchset and merget patch 1 and 3 as suggested by Chanwoo Choi, - changed devfreq_{susped|resume}_device functions, - added doxygen information for new entres in 'struct devfreq', - devfreq_set_target skipped one argument, now resume_freq is set inside, - minor changes addresing comments from maintainers regarding the style, Regards, Lukasz Luba Lukasz Luba (5): devfreq: refactor set_target frequency function devfreq: add support for suspend/resume of a devfreq device devfreq: add devfreq_suspend/resume() functions drivers: power: suspend: call devfreq suspend/resume arm: dts: exynos4: opp-suspend in DMC and leftbus arch/arm/boot/dts/exynos4210.dtsi | 2 + arch/arm/boot/dts/exynos4412.dtsi | 2 + drivers/base/power/main.c | 3 + drivers/devfreq/devfreq.c | 153 ++++++++++++++++++++++++++++++-------- include/linux/devfreq.h | 13 ++++ 5 files changed, 141 insertions(+), 32 deletions(-) -- 2.7.4