summaryrefslogtreecommitdiff
path: root/thermal
diff options
context:
space:
mode:
authorTeYuan Wang <kamewang@google.com>2021-05-12 11:50:57 +0800
committerTeYuan Wang <kamewang@google.com>2021-05-12 12:23:16 +0800
commite81bcc7131f4ef722aa12eb7b121b7fea5a9c282 (patch)
tree3d86c6748c916a3930dacba395040b0d8088224c /thermal
parent7295c6b29acb13e4b0dcdbb474e9f757cd1ec85a (diff)
downloadpixel-e81bcc7131f4ef722aa12eb7b121b7fea5a9c282.tar.gz
thermal: chown quiet_therm trip point sysfs
Base on the HW's proposal, we need to use quiet_therm as the trigger sensor of virtual sensor, so we need to chown the trip point for thermalHAL to set the trip point. Bug: 184592229 Test: check the permission with ls -al Change-Id: I898db90cc73d8dd3acd951b32e3c51a5b2355809
Diffstat (limited to 'thermal')
-rw-r--r--thermal/Thermal.cpp3
-rw-r--r--thermal/android.hardware.thermal@2.0-service.pixel.rc6
2 files changed, 7 insertions, 2 deletions
diff --git a/thermal/Thermal.cpp b/thermal/Thermal.cpp
index 4e58fb7c..ea826595 100644
--- a/thermal/Thermal.cpp
+++ b/thermal/Thermal.cpp
@@ -285,6 +285,9 @@ void Thermal::dumpVirtualSensorInfo(std::ostringstream *dump_buf) {
case FormulaOption::COUNT_THRESHOLD:
*dump_buf << "COUNT_THRESHOLD";
break;
+ case FormulaOption::WEIGHTED_AVG:
+ *dump_buf << "WEIGHTED_AVG";
+ break;
case FormulaOption::MAXIMUM:
*dump_buf << "MAXIMUM";
break;
diff --git a/thermal/android.hardware.thermal@2.0-service.pixel.rc b/thermal/android.hardware.thermal@2.0-service.pixel.rc
index fce3a6ca..ebf5435d 100644
--- a/thermal/android.hardware.thermal@2.0-service.pixel.rc
+++ b/thermal/android.hardware.thermal@2.0-service.pixel.rc
@@ -35,8 +35,10 @@ on property:vendor.thermal.link_ready=1
chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_hyst
chown system system /dev/thermal/tz-by-name/soc/mode
# thermal
- chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_hyst
+ chown root system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_temp
+ chmod 660 /dev/thermal/tz-by-name/quiet_therm/trip_point_0_temp
+ chown root system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_hyst
+ chmod 660 /dev/thermal/tz-by-name/quiet_therm/trip_point_0_hyst
chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote
chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote
chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote