blob: 672b0ffce179275e784b91404c9e5087795f44f6 [file] [log] [blame]
Lisa Nguyenadf9df92015-01-25 18:16:45 -08001#!/bin/sh
Sanjay Singh Rawat2f7295d2013-08-21 18:19:42 +05302#
3# PM-QA validation test suite for the power management on Linux
4#
5# Copyright (C) 2013, Linaro Limited.
6#
7# This program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public License
9# as published by the Free Software Foundation; either version 2
10# of the License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20#
21# Contributors:
22# Sanjay Singh Rawat <sanjay.rawat@linaro.org> (LG Electronics)
23# - initial API and implementation
24#
25
26# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/QA/Scripts#thermal_00
27
Lisa Nguyenadf9df92015-01-25 18:16:45 -080028. ../include/functions.sh
29. ../include/thermal_functions.sh
Sanjay Singh Rawat2f7295d2013-08-21 18:19:42 +053030
31check_cooling_device_type() {
32 local all_zones=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']")
33 echo "Cooling Device list:"
34 for i in $all_zones; do
35 local type=$(cat $THERMAL_PATH/$i/type)
36 echo "- $type"
37 done
38}
39
40check_thermal_zone_type() {
41 local all_zones=$(ls $THERMAL_PATH | grep "thermal_zone['$MAX_ZONE']")
42 echo "Thermal Zone list:"
43 for i in $all_zones; do
44 local type=$(cat $THERMAL_PATH/$i/type)
45 echo "- $type"
46 done
47}
48
49for_each_thermal_zone check_thermal_zone_type
50for_each_thermal_zone check_cooling_device_type