From patchwork Tue Dec 18 09:29:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: durgadoss.r@intel.com X-Patchwork-Id: 1891091 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0C346DF23A for ; Tue, 18 Dec 2012 09:35:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754467Ab2LRJet (ORCPT ); Tue, 18 Dec 2012 04:34:49 -0500 Received: from mga03.intel.com ([143.182.124.21]:52766 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754454Ab2LRJeX (ORCPT ); Tue, 18 Dec 2012 04:34:23 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 18 Dec 2012 01:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,308,1355126400"; d="scan'208";a="233077896" Received: from dr3-desktop.iind.intel.com ([10.223.107.127]) by azsmga001.ch.intel.com with ESMTP; 18 Dec 2012 01:34:06 -0800 From: Durgadoss R To: rui.zhang@intel.com, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, hongbo.zhang@linaro.org, wni@nvidia.com, Durgadoss R Subject: [PATCH 7/8] Thermal: Make PER_ZONE values configurable Date: Tue, 18 Dec 2012 14:59:36 +0530 Message-Id: <1355822977-4804-8-git-send-email-durgadoss.r@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355822977-4804-1-git-send-email-durgadoss.r@intel.com> References: <1355822977-4804-1-git-send-email-durgadoss.r@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch makes MAX_SENSORS_PER_ZONE and MAX_CDEVS_PER_ZONE values configurable. The default value is 1, and range is 1-12. Signed-off-by: Durgadoss R --- No great reason for using 12. --- drivers/thermal/Kconfig | 14 ++++++++++++++ include/linux/thermal.h | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index d96da07..c5ba3340 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -15,6 +15,20 @@ menuconfig THERMAL if THERMAL +config THERMAL_MAX_SENSORS_PER_ZONE + int "Maximum number of sensors allowed per thermal zone" + default 1 + range 1 12 + ---help--- + Specify the number of sensors allowed per zone + +config THERMAL_MAX_CDEVS_PER_ZONE + int "Maximum number of cooling devices allowed per thermal zone" + default 1 + range 1 12 + ---help--- + Specify the number of cooling devices allowed per zone + config THERMAL_HWMON bool depends on HWMON=y || HWMON=THERMAL diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 581dc87..7b0359b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -49,9 +49,9 @@ /* Default Thermal Governor: Does Linear Throttling */ #define DEFAULT_THERMAL_GOVERNOR "step_wise" -#define MAX_SENSORS_PER_ZONE 5 - -#define MAX_CDEVS_PER_ZONE 5 +/* Maximum number of sensors/cdevs per zone, defined through Kconfig */ +#define MAX_SENSORS_PER_ZONE CONFIG_THERMAL_MAX_SENSORS_PER_ZONE +#define MAX_CDEVS_PER_ZONE CONFIG_THERMAL_MAX_CDEVS_PER_ZONE /* If we map each sensor with every possible cdev for a zone */ #define MAX_MAPS_PER_ZONE (MAX_SENSORS_PER_ZONE * MAX_CDEVS_PER_ZONE)