Received: by 10.223.176.5 with SMTP id f5csp406667wra; Wed, 7 Feb 2018 01:05:52 -0800 (PST) X-Google-Smtp-Source: AH8x224zSrnML/BmY8rkSsb2/SoCYIhzeh1xj/iemu+QMeS/YjYjdytOqsEZQki4yGgRfvVoG6P3 X-Received: by 10.99.100.198 with SMTP id y189mr4250580pgb.277.1517994352276; Wed, 07 Feb 2018 01:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517994352; cv=none; d=google.com; s=arc-20160816; b=wNCzap5/Fhot65sY84tQZU3sWe2Ia1r81+CCHgeSn5BRqF99Kvph5MHvzigq24kQ8B lR1ZBSSetUvqxSAtICWdJG45uRyaRd9EbXTjpkNBRDSbt84J9jT1TiHFj6cr5acVvRlk 40xsDeKZMX6ztT8l6HcECiphcNYRyzhtHe9bSv5/ctQ1J7hO6VUGDEZodVV6ut8TFrRv KLFZAylzbztrkDEdYtKi5IWYjNTSJ1qZPOgXHnXTi4VejoxArJUMOW37Fp4/xFUiqT+R LQOwJPeaoyknLeotnDRUA6pOHMOSIhww3QSZg50BDRxhx18g4/73EDg+GnkuqDwxbDUl HS6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1kFfM4SOzc8m30EO9eIfhs+g1JqvSC926TLb4MWk+j8=; b=TR0SKyH+0xBxnY/aIe3alA0MS/LFRdh4Mypu4CC5SvAIw37POhA/YESwNJ/E47ypyP nQrla6sxNDEYQBALR9G47y6xjVmKlHdSLYK9xp7LVpFMPDBr+OrgIp2OcQZMgIFSDCej 8+7S1JOH5D0Cd1MgOhDbLrbeBXTrJi0a1Ip7f8jYoARQ90gBjkz4aILqplgsPIxTt6k5 hpqWLUcLZzoN4ZUNmSG9ck5FUd5YacdmS7CjaKRlaF887W6UtVr9xnqon7yLcUWuiRhD OT56X2JlNQan+y1TGCbKdf+NrETP0yvOyKae+W4jXp97BBo15UHhm0ruxCGSW7GGSdm9 eGOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jb+5I/E/; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si676303pgc.593.2018.02.07.01.05.37; Wed, 07 Feb 2018 01:05:52 -0800 (PST) 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=@linaro.org header.s=google header.b=jb+5I/E/; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753469AbeBGJEy (ORCPT + 99 others); Wed, 7 Feb 2018 04:04:54 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:42773 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbeBGJEw (ORCPT ); Wed, 7 Feb 2018 04:04:52 -0500 Received: by mail-pf0-f193.google.com with SMTP id b25so61969pfd.9 for ; Wed, 07 Feb 2018 01:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1kFfM4SOzc8m30EO9eIfhs+g1JqvSC926TLb4MWk+j8=; b=jb+5I/E/JqE1oEt1xRe7WRGXkooT6Lc6tpt7TdzngnAs45estFCJmWucqPlpZ4V9v8 7R3CtLtaTDBcR+KvcgHokCtnTmdwixKgyxhiqWU/tpV0sVVkdOxCHyFV2t/FN4Uv43MP wQ9XKdZt6yKEvy8nTx7wZq/kLeJShY9hNzkzs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1kFfM4SOzc8m30EO9eIfhs+g1JqvSC926TLb4MWk+j8=; b=jsRLNAxHwMKKknunxGkhk+/g/lkdUuUJAh72U0M+DDQL2BFyq5csn+M/Bud9waj9Ri HMOuMPjqQb3cZKoPfCYeoosv1I3V2saZ4KzSpNH/uH8f+6wOzNGE9jRfwKVlG1XyEFEz Vi6Ztxs/PgH+ghHIQn0RV8pTwsvaOaIKkg6S+k3cqrKSKXtJ2Hftd4NaLy2OnqkvxITE Aj8eqLp8mh8GOXtohmjMViF8nZMWvApCID7FPH5ptdEqVndWTKGZYVUfgObTaZ81eTbv 6rC0xbcaO8g03NAxVb9+Erzr4GFiVZwAWWx41qecLgnHBcoZGJlJBhwUrEaxx0xO7Lv8 Rq8Q== X-Gm-Message-State: APf1xPD1p1/Vumv92VEjnWUvO16/oITIiIKbbYb+Z12Ec1nkPdSA5Th9 hj1IH3kyybLS4qpdWY9oWV+K5Q== X-Received: by 10.99.67.66 with SMTP id q63mr4254869pga.175.1517994291432; Wed, 07 Feb 2018 01:04:51 -0800 (PST) Received: from localhost ([122.172.61.199]) by smtp.gmail.com with ESMTPSA id b68sm2367565pfg.159.2018.02.07.01.04.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 01:04:50 -0800 (PST) Date: Wed, 7 Feb 2018 14:34:48 +0530 From: Viresh Kumar 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" Subject: Re: [PATCH 4/8] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice 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 Content-Disposition: inline In-Reply-To: <1516721671-16360-5-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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