From patchwork Thu Dec 4 04:11:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 5435061 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90A729F1D4 for ; Thu, 4 Dec 2014 04:13:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC4482021F for ; Thu, 4 Dec 2014 04:13:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0364720266 for ; Thu, 4 Dec 2014 04:13:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbaLDENO (ORCPT ); Wed, 3 Dec 2014 23:13:14 -0500 Received: from mail-pd0-f174.google.com ([209.85.192.174]:35105 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbaLDENN (ORCPT ); Wed, 3 Dec 2014 23:13:13 -0500 Received: by mail-pd0-f174.google.com with SMTP id w10so16763598pde.19 for ; Wed, 03 Dec 2014 20:13:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=s5LkYrlTxg1JnnMI/qctru/ITy20lrdkUwfj3tKzp5Q=; b=P2XSGiFr8xVZJzfxZG/yLDl2VPm/VdEhRPfCiIOHSbombJxswdIl3tdpYbvpXyzTWA YxDc953Aimkqqrozh0nfFLRXQ/WFfPc9kXwPemfG0RejlhKVWB0CQsz+Iv5ppvmkSIyS 5bfPfbJAQS6MPnHcRMA3wOtNPyK+k5FeZegJ3VKsmrkTZOd5bukMPi/3gsohP+rgsMb5 H+SPyXNQz6k1tnWP2rma1pgEfpw/P9Xzc4N9Gl7HqNpohkoJ/ItunwxlC+bPhCBwn81d gikg91KdKjXUkJo2SgjtnZcm8sQfc8CQyIPUZrqV/abhmAgvS7t8sUdcTPOtxUB8APAM nUlg== X-Gm-Message-State: ALoCoQko/4t8i9mDzr9fKf1cww9RH2nOJA8EFRTFL11zpQsflyMyw9VoYQfZ4ThBSk1mKpFIluQx X-Received: by 10.68.65.16 with SMTP id t16mr22071710pbs.70.1417666393073; Wed, 03 Dec 2014 20:13:13 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id ca3sm24365853pbb.84.2014.12.03.20.13.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:13:12 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, amit.daniel@samsung.com, javi.merino@arm.com, Viresh Kumar Subject: [PATCH V2 07/26] thermal: cpu_cooling: Add comment to clarify relation between cooling state and frequency Date: Thu, 4 Dec 2014 09:41:49 +0530 Message-Id: <9bbfd5e1683a89aa5016704a09e13796a89b6407.1417664938.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This wasn't explained well anywhere and should be clearly specified. Lets add a top level comment for this. Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index cc10641..a5a9317 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -28,6 +28,20 @@ #include #include +/* + * Cooling state <-> CPUFreq frequency + * + * Cooling states are translated to frequencies throughout this driver and this + * is the relation between them. + * + * Highest cooling state corresponds to lowest possible frequency. + * + * i.e. + * level 0 --> 1st Max Freq + * level 1 --> 2nd Max Freq + * ... + */ + /** * struct cpufreq_cooling_device - data for cooling device with cpufreq * @id: unique integer value corresponding to each cpufreq_cooling_device