From patchwork Tue Jan 23 15:34:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 125538 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1826974ljf; Tue, 23 Jan 2018 07:35:38 -0800 (PST) X-Google-Smtp-Source: AH8x225pQonjDG1S60UQltPSWeR6+8P7eDTEpL+UitLzAqLF0qXzoSoojCFIcadP8A2wYoYqCqJu X-Received: by 10.107.167.69 with SMTP id q66mr3946506ioe.130.1516721738103; Tue, 23 Jan 2018 07:35:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516721738; cv=none; d=google.com; s=arc-20160816; b=umz74CJrPxak/m02Morx5r1OkcwzhRXz7gy0dwvhJboL1RsAXs1SlP57Hx4+z2EUZp IPho+iyxA7sXU6gW8T/izUn5MyjOCqghiVJ0ZjBGj09V305WXHZvVIuAErLdriiBJc9z U/vZv4LxpP/hKg682oqvaZ4aptRZAzKuaJs7WmCGhSfrvrNtEggJiMPzlwh+7wbJTA8x g199EmCvN7jBcu+kDm9aXQqsQqBPdTg1hwXAeZNbO2IK6lz/8YHaB0sz7aA75cYjIxcw lA3vznaisflPlfFdktTOTIsklo4twYHq8ScTDRj8ZxnOV1xVjebnm4Xn3DO+TzdUFdIc gtQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sh97EkWc09kfczjwyPtKYXB2KEPdfcahX13diBwKfHY=; b=pRdL2RjJ7S85BQyRVzGukfPtqx7/4X//ASCxHNg4j0OHWtImWif98AKzFPAb0UpF0M 5k5Ht9//bNkWgnVk5eTfv2lYVz7w+tTb93ga942Y8cdAhYiI7WlmXKsUIReJILoHLZtk wdFcjQvCqi14fH5zCf73sludaNj1Ae+V3U35Az+tE8/pru0lI7ZATKrgeAJ4QAEN39/i bOZRWvkzDDazoDIApldfLSkQ039wThSL+EY6V5zutdCw1RxQ2B1TyejI4FbfeYpP17oK R0WDvZr3JYltXc+y7oaoAlUceUPNosxNU848obLuOTISy0+//mZJUqwVLnGIOC1/wCY+ c1Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hM2n/88S; 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 186si9515001ioc.215.2018.01.23.07.35.37; Tue, 23 Jan 2018 07:35:38 -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=hM2n/88S; 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 S1752136AbeAWPfg (ORCPT + 28 others); Tue, 23 Jan 2018 10:35:36 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:47000 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbeAWPf3 (ORCPT ); Tue, 23 Jan 2018 10:35:29 -0500 Received: by mail-wm0-f65.google.com with SMTP id 143so2629230wma.5 for ; Tue, 23 Jan 2018 07:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sh97EkWc09kfczjwyPtKYXB2KEPdfcahX13diBwKfHY=; b=hM2n/88SU3dUsZOtkP//Q8IxLbtr/hTH8Lpi30aiPsRpVtwV93gi21vzxsGSzYqhRE n0W9CgfuTyKszvIl2O/RMYaIfxhlJ9e7cxjv5LrG/p4J8k4gslQfhSc+fXBAqRbdvlL9 VFLXkN5+JKLZO7NY5r5fz2SbNZreTraatWCfE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sh97EkWc09kfczjwyPtKYXB2KEPdfcahX13diBwKfHY=; b=N02Q/+zvcyFScd1n0FDHEh6pMqtMldi3Bbd+NdNbIVGQmX1Hxau5tCThYyQSTekfiK nDuvFCMS0yaOD77VjB/iACGIxxZRwFMKrUN0RCpC7n4B5U+IVa0qlCsrGS1TAjJUdkX6 3OBUDky9wNP804++leDz+QfAo6bSh+HOHX9hWHqv8ITjsH8MB2n1jq9kguu3dchgnG/4 H9TrMwx/tZT28vGjY7jbhh6mGdWDRl850fSeY1YSMZl6FShAN45IqwWoMMszTPGDD2kh 3ls9HpCvjCa1FdO27oSHzxOVgPjtiucvL6N42TyaJkp1RIyD75UyN+MumiSagrqFv98D NHKQ== X-Gm-Message-State: AKwxytfCwx39qfn5Ki9x7RaqYQyV3+phbJWZ246JL7Q/hE/7wAQazAXT NaCUTyi1Ci2y5fq6ker5ejxtLA== X-Received: by 10.28.32.5 with SMTP id g5mr2026281wmg.62.1516721728143; Tue, 23 Jan 2018 07:35:28 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:8138:f09d:5869:1250]) by smtp.gmail.com with ESMTPSA id o98sm915624wrb.19.2018.01.23.07.35.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 07:35:27 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, Zhang Rui , linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH 4/8] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Date: Tue, 23 Jan 2018 16:34:27 +0100 Message-Id: <1516721671-16360-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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 + 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"