From patchwork Wed Aug 21 12:59:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 19376 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C384248E6 for ; Wed, 21 Aug 2013 12:58:07 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id s1sf350841qcw.8 for ; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=YjwJDweXvD0sBbmM8CijxGxOUCda3LX2XNKkostmuaY=; b=fkWLuKkgSMfi2ULg06RvqEPt4+jyWifpZn+gdhTdb5Vvs2p5SqW8ofpYpycrLJ6POw qMKb0+CRD1DxeWeMGy6ZP/lAm40yjY5Ev4clGEPAQLz/tyEhFck8sPSWvjLHTFFLofAC Hc6QZXsk56Ek2DVcjLvw72WfL7CrvY08Q5oOuuuWIFsZgfgegB5Y6ZHR8hiVskFm+26G Zzrdpl7bFSeaSRwgrS0TpLGxH0OH8aY4HJVZE7rxchzeQJiluCHV/U74KzJJI/w3HgHw a27nnL4WTqs5s2+XZpk2e/IGRL6Rw5VP7lnRNlPu5e04pOMK1ghkG7aHCmj+drLQLbRL mBZA== X-Received: by 10.236.193.6 with SMTP id j6mr2581386yhn.44.1377089886632; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.10 with SMTP id em10ls678435qeb.82.gmail; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) X-Received: by 10.58.19.162 with SMTP id g2mr6450756vee.12.1377089886472; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id rx10si2069673vdc.125.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 05:58:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so225547vcb.6 for ; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) X-Gm-Message-State: ALoCoQmOiTNyTcPpFWcNM54j24gSILYWLv0bgJN5kZidYwUhTT97TiWSJ34BV8/7ACgE9OW2f+ur X-Received: by 10.52.227.6 with SMTP id rw6mr5404650vdc.19.1377089886335; Wed, 21 Aug 2013 05:58:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp218292vcz; Wed, 21 Aug 2013 05:58:05 -0700 (PDT) X-Received: by 10.66.120.74 with SMTP id la10mr9658526pab.9.1377089885118; Wed, 21 Aug 2013 05:58:05 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id dw1si5136604pbc.96.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 05:58:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id q10so418661pdj.35 for ; Wed, 21 Aug 2013 05:58:04 -0700 (PDT) X-Received: by 10.68.252.68 with SMTP id zq4mr7710024pbc.49.1377089884542; Wed, 21 Aug 2013 05:58:04 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id hx1sm8270502pbb.35.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 05:58:04 -0700 (PDT) From: Sanjay Singh Rawat To: private-pmwg@linaro.org Cc: Sanjay Singh Rawat Subject: [PATCH pmqa] thermal: add support to list all thermal zones and cooling devices Date: Wed, 21 Aug 2013 18:29:45 +0530 Message-Id: <1377089985-14546-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Sanjay Singh Rawat --- thermal/thermal_00.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ thermal/thermal_00.txt | 1 + 2 files changed, 51 insertions(+) create mode 100755 thermal/thermal_00.sh create mode 100644 thermal/thermal_00.txt diff --git a/thermal/thermal_00.sh b/thermal/thermal_00.sh new file mode 100755 index 0000000..36e3428 --- /dev/null +++ b/thermal/thermal_00.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# PM-QA validation test suite for the power management on Linux +# +# Copyright (C) 2011, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# +# Contributors: +# Sanjay Singh Rawat (LG Electronics) +# - initial API and implementation +# + +# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/QA/Scripts#thermal_00 + +source ../include/functions.sh +source ../include/thermal_functions.sh + +check_cooling_device_type() { + local all_zones=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']") + echo "Cooling Device list:" + for i in $all_zones; do + local type=$(cat $THERMAL_PATH/$i/type) + echo "- $type" + done +} + +check_thermal_zone_type() { + local all_zones=$(ls $THERMAL_PATH | grep "thermal_zone['$MAX_ZONE']") + echo "Thermal Zone list:" + for i in $all_zones; do + local type=$(cat $THERMAL_PATH/$i/type) + echo "- $type" + done +} + +for_each_thermal_zone check_thermal_zone_type +for_each_thermal_zone check_cooling_device_type diff --git a/thermal/thermal_00.txt b/thermal/thermal_00.txt new file mode 100644 index 0000000..9aa4624 --- /dev/null +++ b/thermal/thermal_00.txt @@ -0,0 +1 @@ +list existing thermal-zones and cooling-devices in the system