From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V3] cpufreq: qoriq: Register cooling device based on device tree Date: Mon, 29 Feb 2016 11:05:37 +0100 Message-ID: <8056913.EWiGLtcdOV@wuerfel> References: <1448529671-48216-1-git-send-email-hongtao.jia@freescale.com> <1456531704.5360.53.camel@buserror.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-pm-owner@vger.kernel.org To: Li Yang Cc: Scott Wood , linuxppc-dev , devicetree@vger.kernel.org, "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Jia Hongtao , Eduardo Valentin , Viresh Kumar List-Id: devicetree@vger.kernel.org On Friday 26 February 2016 18:41:06 Li Yang wrote: > >> > > >> > It would be perfect if this it true. But I tried with the following > >> > change, it just makes QORIQ_CPUFREQ non-selectable if THERMAL=m. > >> > > >> > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig > >> > index dcb972a38fbc..ca05037dd565 100644 > >> > --- a/drivers/cpufreq/Kconfig > >> > +++ b/drivers/cpufreq/Kconfig > >> > @@ -297,6 +297,7 @@ endif > >> > config QORIQ_CPUFREQ > >> > tristate "CPU frequency scaling driver for Freescale QorIQ SoCs" > >> > depends on OF && COMMON_CLK && (PPC_E500MC || ARM) > >> > + depends on !CPU_THERMAL || THERMAL=y > >> > select CLK_QORIQ > >> > help > >> > This adds the CPUFreq driver support for Freescale QorIQ SoCs > >> Oops. > >> I find we can achieve your desired result with the following change instead: > >> > >> + depends on (THERMAL=m && m) || THERMAL=y || THERMAL=n > > > > "depends on THERMAL || !THERMAL" should also work. > > Right. And this is more simpler. Note the check on !CPU_THERMAL rather than !THERMAL in my patch, that part was correct. I think the line should be depends on !CPU_THERMAL || THERMAL as some other drivers do. I must have copied the line from ARM_MT8173_CPUFREQ, which is a 'bool' symbol, when it should have been the same as ARM_BIG_LITTLE_CPUFREQ and CPUFREQ_DT. Arnd