blob: 8860eba5366bfb9c6ed99dceed5d90a916ed701b [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
Sanjay Singh Rawat2f7295d2013-08-21 18:19:42 +053029
30check_cooling_device_type() {
Lisa Nguyen4e0b59a2015-01-25 17:46:40 -080031 all_zones=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']")
Lisa Nguyenfb1103c2015-10-31 03:09:43 -070032 echo "Cooling Device list"
33 echo "-------------------"
34 if [ -z "$all_zones" ]; then
35 echo "- None"
36 else
37 for i in $all_zones; do
38 type=$(cat $THERMAL_PATH/$i/type)
39 echo $i
40 echo "- $type"
41 done
42 fi
43 echo "\n"
Sanjay Singh Rawat2f7295d2013-08-21 18:19:42 +053044}
45
46check_thermal_zone_type() {
Lisa Nguyen4e0b59a2015-01-25 17:46:40 -080047 all_zones=$(ls $THERMAL_PATH | grep "thermal_zone['$MAX_ZONE']")
Lisa Nguyenfb1103c2015-10-31 03:09:43 -070048 echo "Thermal Zone list"
49 echo "-----------------"
50 if [ -z "$all_zones" ]; then
51 echo "- None"
52 else
53 for i in $all_zones; do
54 type=$(cat $THERMAL_PATH/$i/type)
55 echo $i
56 echo "- $type"
57 done
58 fi
59 echo "\n"
Sanjay Singh Rawat2f7295d2013-08-21 18:19:42 +053060}
61
Lisa Nguyenfb1103c2015-10-31 03:09:43 -070062check_thermal_zone_type
63check_cooling_device_type