diff options
author | Cyan_Hsieh <cyanhsieh@google.com> | 2019-05-22 13:09:00 +0800 |
---|---|---|
committer | Cyan_Hsieh <cyanhsieh@google.com> | 2019-05-22 13:12:20 +0800 |
commit | e7a6c4edfa7b2cdd492804628b39f3db30b1d346 (patch) | |
tree | e10fe91fc9e0f6b6fb46e2f49087d211e03feccc | |
parent | e4d3100e398a1782eb567933f87bb30422fb001d (diff) | |
parent | 58403485b9822ab43f84ec7c2b8f3b9d5beb0912 (diff) | |
download | thermal-android10-qpr2-s4-release.tar.gz |
Merge remote-tracking branch 'goog/qcom/release/LA.UM.8.1.C9.09.00.00.518.158' into qt-r1-devandroid-mainline-10.0.0_r9android-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android-10.0.0_r33android-10.0.0_r32android-10.0.0_r31android-10.0.0_r30android10-qpr3-s1-releaseandroid10-qpr3-releaseandroid10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-releaseandroid10-qpr2-s1-releaseandroid10-qpr2-releaseandroid10-qpr1-mainline-releaseandroid10-mainline-media-releaseandroid10-d4-s1-releaseandroid10-d4-release
Bug: 132954074
Change-Id: I9447bb03b7a2cbfa906fc2424dfe80f4478f0226
-rw-r--r-- | thermal_common.h | 3 | ||||
-rw-r--r-- | thermal_target.c | 44 |
2 files changed, 45 insertions, 2 deletions
diff --git a/thermal_common.h b/thermal_common.h index 76bcff6..0d00d5b 100644 --- a/thermal_common.h +++ b/thermal_common.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -44,6 +44,7 @@ enum therm_msm_id { THERM_MSM_8917, THERM_TRINKET, THERM_KONA, + THERM_LITO, }; struct target_therm_cfg { diff --git a/thermal_target.c b/thermal_target.c index 7298f59..7d3efc2 100644 --- a/thermal_target.c +++ b/thermal_target.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -78,6 +78,7 @@ static struct therm_msm_soc_type msm_soc_table[] = { {THERM_MSM_8917, 309}, {THERM_MSM_8917, 386}, // This SOC ID is for QM215 {THERM_TRINKET, 394}, + {THERM_LITO, 400}, }; static char *cpu_sensors_talos[] = @@ -178,6 +179,43 @@ static struct target_therm_cfg sensor_cfg_sdmmagpie[] = { } }; +static char *misc_sensors_lito[] = +{ + "gpuss-0-usr", + "battery", + "xo-therm-usr" +}; + +static struct target_therm_cfg sensor_cfg_lito[] = { + { + .type = DEVICE_TEMPERATURE_CPU, + .sensor_list = cpu_sensors_sdmmagpie, + .sens_cnt = ARRAY_SIZE(cpu_sensors_sdmmagpie), + .mult = 0.001, + }, + { + .type = DEVICE_TEMPERATURE_GPU, + .sensor_list = &misc_sensors_lito[0], + .sens_cnt = 1, + .mult = 0.001, + .label = "GPU", + }, + { + .type = DEVICE_TEMPERATURE_BATTERY, + .sensor_list = &misc_sensors_lito[1], + .sens_cnt = 1, + .mult = 0.001, + .label = "battery", + }, + { + .type = DEVICE_TEMPERATURE_SKIN, + .sensor_list = &misc_sensors_lito[2], + .sens_cnt = 1, + .mult = 0.001, + .label = "skin", + } +}; + static char *cpu_sensors_trinket[] = { "cpuss-0-usr", @@ -705,6 +743,10 @@ ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, size_t s cfg = sensor_cfg_trinket; num_cfg = ARRAY_SIZE(sensor_cfg_trinket); break; + case THERM_LITO: + cfg = sensor_cfg_lito; + num_cfg = ARRAY_SIZE(sensor_cfg_lito); + break; default: cfg = NULL; num_cfg = 0; |