From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752747AbbGIE7V (ORCPT ); Thu, 9 Jul 2015 00:59:21 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35361 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbbGIE7H (ORCPT ); Thu, 9 Jul 2015 00:59:07 -0400 Date: Thu, 9 Jul 2015 10:29:02 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, open list Subject: Re: [RFC] cpufreq: Add ->get_rate() driver callback Message-ID: <20150709045902.GI1805@linux> References: <1879392.TC0RceaKlH@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1879392.TC0RceaKlH@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09-07-15, 01:41, Rafael J. Wysocki wrote: > On Wednesday, July 08, 2015 04:07:32 PM Viresh Kumar wrote: > > CPUFreq drivers today support a ->get(cpu) callback, which returns > > current rate of a CPU. The problem with ->get() is that it takes a cpu > > number as parameter and this unnecessarily makes things complex. > > > > Firstly the core gets the cpu number by doing operation 'policy->cpu' on > > the policy and then many drivers need to get the policy back and so do > > cpufreq_cpu_get(cpu) on the passed cpu. > > > > As cpufreq core works on policies, it would be better if we pass them > > 'policy' directly and drivers can use policy->cpu if that's all they > > need. > > > > Hence, this patch adds in another callback, ->get_rate() which does > > exactly the same work as ->get(), just that we pass 'policy' as > > parameter instead of 'cpu'. > > > > The plan is to migrate all drivers to this new callback and remove > > ->get() after that. > > > > Signed-off-by: Viresh Kumar > > --- > > Hi Rafael, > > > > I hope you are fine with this stuff :), once you approve I will get > > other patches to migrate existing drivers to this interface. > > I'm generally fine with it, but please target it at 4.4 at the earliest. Sure, but I was a bit curious on why 4.4 and not 4.3 ? as we are still at 4.2-rc1 today, and these patches can be done fairly quickly. -- viresh