From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbeEQXHc (ORCPT ); Thu, 17 May 2018 19:07:32 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:41165 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbeEQXHa (ORCPT ); Thu, 17 May 2018 19:07:30 -0400 X-Google-Smtp-Source: AB8JxZp9EwoZgioIXq33wozF80CeQS0o3dXXVW+x94HJDZQts9i5V21ARRKOFVu67G02p3dq8AdQnQ== Date: Thu, 17 May 2018 16:07:28 -0700 From: Matthias Kaehlcke To: Chanwoo Choi Cc: MyungJoo Ham , Kyungmin Park , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris Subject: Re: [RFC PATCH] PM / devfreq: Add policy notifier Message-ID: <20180517230728.GQ19594@google.com> References: <20180515212447.180595-1-mka@chromium.org> <5AFCE27E.20803@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5AFCE27E.20803@samsung.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, May 17, 2018 at 11:01:34AM +0900, Chanwoo Choi wrote: > Hi, > > Could you give some use-case of DEVFREQ_POLICY_NOTIFIER > or send use-case patch with this patch? This is a WIP patch that makes use of the DEVFREQ_POLICY_NOTIFIER: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1065122 > I already knew the CPUFREQ_POLICY_NOTIFIER. > But, until now, there are no any requirements of DEVFREQ_POLICY_NOTIFIER. > If there are no any use-case, it is not necessary codes. Sure, I intend to land the above driver upstream if devfreq can provide the necessary interfaces. > On 2018년 05월 16일 06:24, Matthias Kaehlcke wrote: > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > > index fe2af6aa88fc..a7294c056f65 100644 > > --- a/drivers/devfreq/devfreq.c > > +++ b/drivers/devfreq/devfreq.c > > @@ -273,6 +273,9 @@ int update_devfreq(struct devfreq *devfreq) > > if (err) > > return err; > > > > + srcu_notifier_call_chain(&devfreq->policy_notifier_list, > > + DEVFREQ_ADJUST, &freq); > > It is not proper to used 'freq' as the passed data. > In current step,'freq' is not adjusted and is not final decided > frequency. Right, the next revision will pass a struct devfreq_policy instead, where the notifiers can adjust the min/max values, similar to what cpufreq does. Thanks Matthias