From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH 4/8] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Date: Wed, 7 Feb 2018 14:34:48 +0530 Message-ID: <20180207090448.GP28462@vireshk-i7> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-5-git-send-email-daniel.lezcano@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:33092 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbeBGJEw (ORCPT ); Wed, 7 Feb 2018 04:04:52 -0500 Received: by mail-pf0-f194.google.com with SMTP id u15so69768pfa.0 for ; Wed, 07 Feb 2018 01:04:51 -0800 (PST) Content-Disposition: inline In-Reply-To: <1516721671-16360-5-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Daniel Lezcano Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, Zhang Rui , "open list:THERMAL" On 23-01-18, 16:34, Daniel Lezcano wrote: > The next changes will add new way to cool down a CPU. In order to > sanitize and make the overall cpu cooling code consistent and robust > we must prevent the cpu cooling devices to co-exists with the same > purpose at the same time in the kernel. > > Make the CPU cooling device a choice in the Kconfig, so only one CPU > cooling strategy can be chosen. > > Signed-off-by: Daniel Lezcano > --- > drivers/thermal/Kconfig | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > index 315ae29..925e73b 100644 > --- a/drivers/thermal/Kconfig > +++ b/drivers/thermal/Kconfig > @@ -142,17 +142,31 @@ config THERMAL_GOV_POWER_ALLOCATOR > allocating and limiting power to devices. > > config CPU_THERMAL > - bool "generic cpu cooling support" > - depends on CPU_FREQ > + bool "Generic cpu cooling support" > depends on THERMAL_OF > help > + Enable the CPU cooling features. If the system has no active > + cooling device available, this option allows to use the CPU > + as a cooling device. > + > +choice > + prompt "CPU cooling strategies" > + depends on CPU_THERMAL > + default CPU_FREQ_THERMAL > + help > + Select the CPU cooling strategy. > + > +config CPU_FREQ_THERMAL Perhaps you should start using this macro in code in this patch itself. > + bool "CPU frequency cooling strategy" > + depends on CPU_FREQ > + help > This implements the generic cpu cooling mechanism through frequency > reduction. An ACPI version of this already exists > (drivers/acpi/processor_thermal.c). > This will be useful for platforms using the generic thermal interface > and not the ACPI interface. > > - If you want this support, you should say Y here. > +endchoice > > config CLOCK_THERMAL > bool "Generic clock cooling support" > -- > 2.7.4 -- viresh