Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1981007imm; Sun, 27 May 2018 22:21:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZh5lRL50O87OMJe0zWxIZZb6hpMIqh87AEldadNOE3AyDM6b/VpRvmzAIjpw1ZFnFyCzU X-Received: by 2002:a17:902:ac8d:: with SMTP id h13-v6mr12285703plr.338.1527484866673; Sun, 27 May 2018 22:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527484866; cv=none; d=google.com; s=arc-20160816; b=FRNdkKiZ7RaRxWv3+3s4VyFKDH5Lydl8yggZcJsp5Jo7yjm8pjVK6pABxJOd41O0qm DHiIW2F8ziZiYP4Fi3GA7CvIaYrHopzX8YQVNFFe49CStmscTwJPuI1un/yGymF1l+29 gggPmlqW0lufslLp3HYjErYMtlZc55TEsYqWfF0Sq01MPENBYaQxovMxsPMdv2IXLpM1 wfioJWahN5ie63lmX1+HNT2FUvWiqYzzMoNwnWxSCu87B35D5VsCsQIBwZBQonLfqXGV NqWkXsGpZw0A6OIz/jvwNGGYAKi6jZBoVqZdiouCL1YIqsLc9G8+nl6C/OYJVVcXj9YM GoeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:from :reply-to:subject:mime-version:to:dkim-signature:dkim-filter :arc-authentication-results; bh=0xh9s47QHkNGI/M6RYU5qLE8SLLfh7bSd0U5HAJ+fvU=; b=fgUCAuqoL0cNtIOofwl0lGSA1W+SSln2jlESztM28MLAFn+U+YUl5Mo6kJp1/hyeys XrqIitE3g8BSbf5tq67e9aE7yfFDN/8WlbKNQKJDG961Y/nNyWThBZL/WdNabd9GAz3E EMWe/aEADLX2vCa00VMpRREDJ7BzUl7B6K0vZ/rHLTa50JNuXAZubytXRy8hFv4FMILs pE8VHQY6iGv/JsTmW/A8X4ToAURpCAzf5OMVzYS9g+5yEJ7yvwjuQDCdltR/x45piDOv qd+xws+R/UoZifQaXyFUlvgq+XtLxgs6zxbXMPmGBZtf3DSuFy/gyL+8a+pxhl/cp4ZS ArjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=dlPKRFr0; 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 q14-v6si28428519pll.277.2018.05.27.22.20.51; Sun, 27 May 2018 22:21:06 -0700 (PDT) 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=dlPKRFr0; 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 S1753200AbeE1FUH (ORCPT + 99 others); Mon, 28 May 2018 01:20:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:35994 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753170AbeE1FUD (ORCPT ); Mon, 28 May 2018 01:20:03 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180528052001epoutp027a2f88c23cae98a407d9ceec7f28c801~yt1WSVnDS1835518355epoutp024 for ; Mon, 28 May 2018 05:20:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180528052001epoutp027a2f88c23cae98a407d9ceec7f28c801~yt1WSVnDS1835518355epoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527484801; bh=0xh9s47QHkNGI/M6RYU5qLE8SLLfh7bSd0U5HAJ+fvU=; h=To:Subject:Reply-To:From:CC:In-Reply-To:Date:References:From; b=dlPKRFr0/rGQkWJ5rzgWeSB1I/c1YOdUVhwYyFcXhwDoN+D1oYWkoigcnbL2gRFla UOowYs7GpLOz76ACidcsKTJTECQbGDAP1r5FiBxzgtCxuEOOpTYWff4h7FByQi7acQ Ae/DivKonlc6PJ+2WmpBAoJRCFsVKQ3LVpYwBj/s= Received: from epsmges1p5.samsung.com (unknown [182.195.40.155]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528051956epcas1p139d746931c6adeb089cca8a92b909cf9~yt1RRF8DB2865528655epcas1p1g; Mon, 28 May 2018 05:19:56 +0000 (GMT) X-AuditID: b6c32a39-235ff7000000106b-7a-5b0b9175af7e Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 8D.25.04203.5719B0B5; Mon, 28 May 2018 14:19:49 +0900 (KST) To: undisclosed-recipients:; Mime-Version: 1.0 Subject: RE: [PATCH 07/11] PM / devfreg: Add support policy notifiers Reply-To: myungjoo.ham@samsung.com From: MyungJoo Ham CC: Kyungmin Park , Chanwoo Choi , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Brian Norris , Douglas Anderson , Matthias Kaehlcke X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20180525203043.249193-8-mka@chromium.org> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20180528051949epcms1p3bedd6ac3e2f20d0bcd8cb082349d97fa@epcms1p3> Date: Mon, 28 May 2018 14:19:49 +0900 X-CMS-MailID: 20180528051949epcms1p3bedd6ac3e2f20d0bcd8cb082349d97fa Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-CPGSPASS: Y X-CPGSPASS: Y CMS-TYPE: 101P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKJsWRmVeSWpSXmKPExsWy7bCmvm7pRO5og0lrNCz+TjrGbrHp43tW i5eHNC2uf3nOajH/yDlWi7PLDrJZNC9ez2ZxtukNu8XlXXPYLD73HmG0WHr9IpPF5w2PGS1a 9x5hd+D1WDNvDaPH71+TGD1mN1xk8di0qpPNY//cNewefVtWMXp83iQXwB6VapORmpiSWqSQ mpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdK2SQlliTilQKCCxuFhJ 386mKL+0JFUhI7+4xFYp2tDQSM/QwFzPyAhIG8daGZkClSSkZny/2cFasICjou18E2sD4wO2 LkZODgkBE4mWhr+sXYxcHEICOxglznYvZQdJiAjISMyd/RgowcHBKyAo8XeHMEhYWMBV4uCZ vcwgtpCAkkTDzX3MEHF9iY4H2xhBbDYBXYmtG+6ygMxkFljCIrFk439GiGW8EjPan7JA2NIS 25dvZQSZzylgLrHhTCZEWFTi5uq37DD2+2PzoVpFJFrvnWWGsAUlHvzcDRWXknjydiFUfb3E 9c+LmED2SghMYJT4feM/VEJf4tGV2WAP8wr4Sux7vpwVxGYRUJVYN6cBqsZF4tzbBrA4s4C8 xPa3c5hBbmMW0JRYv0sf5vyGjb/Z0dnMAnwS7772sMLEd8x7wgRhq0kc2r0Eql5G4vT0hVD3 e0jM23CFdQKj4ixE6M5CsngWwuIFjMyrGMVSC4pz01OLDQtM9YoTc4tL89L1kvNzNzGCk6yW 5Q7GY+d8DjEKcDAq8fA2/OaKFmJNLCuuzD3EKMHBrCTCy6ULFOJNSaysSi3Kjy8qzUktPsRo CvT/RGYp0eR8YAbIK4k3NDUyNja2MDE0MzU0VBLnbTP/FyUkkJ5YkpqdmlqQWgTTx8TBKdXA WClzYob2koj4F/N3Lt/7RuV8Rvn54sXVDEk3UrNt5G6w1S3axb/OYYnXr/V2Sk4N1wVTZi/d dcjT/UZA4frJrlp+H7o0pL39li5ce7idZ59t+ydlsysCj7+43pG1mzx/Z+qP6in9Uv7fpS9M Y+k4vz2daXpT+Pm8QLuQbd+e7mVP+qvz1LDigRJLcUaioRZzUXEiALeEl/7IAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180525203128epcas5p138dbf89498c03bc2a9221aa662001fd4 References: <20180525203043.249193-8-mka@chromium.org> <20180525203043.249193-1-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >Policy notifiers are called before a frequency change and may narrow >the min/max frequency range in devfreq_policy, which is used to adjust >the target frequency if it is beyond this range. > >Also add a few helpers: > - devfreq_verify_within_[dev_]limits() > - should be used by the notifiers for policy adjustments. > - dev_to_devfreq() > - lookup a devfreq strict from a device pointer > >Signed-off-by: Matthias Kaehlcke >--- > drivers/devfreq/devfreq.c | 47 +++++++++++++++++++++------- > include/linux/devfreq.h | 66 +++++++++++++++++++++++++++++++++++++++ > 2 files changed, 102 insertions(+), 11 deletions(-) Hello Matthias, Why should we have yet another notifier from an instance of devfreq? Wouldn't it better to let the current notifier (transition notifier) handle new events as well by adding possible event states to it? Anyway, is this the reason why you've separated some data of devfreq into "policy" struct? (I was wondering why while reading commit 6/11). Cheers MyungJoo