summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-05-07 21:59:20 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-05-07 21:59:20 +0000
commit1d72c5f8f4d6186b0fcdee23822a9d899fa05023 (patch)
tree1faa5eed61e62eac61612b3c5a9b7848a0f3d764
parent94e2b811935ac8cbdad260372cd0a5b079cd8a78 (diff)
parentce377e2958f237f4ba73c6e5edd7c933131d8a42 (diff)
downloadthermal-pie-platform-release.tar.gz
Snap for 5450365 from ce377e2958f237f4ba73c6e5edd7c933131d8a42 to pi-platform-releasepie-platform-release
Change-Id: Ibf52a0d20fa2f95bc4dcdb622c07788ab7e3dbf3
-rw-r--r--thermal_common.h1
-rw-r--r--thermal_target.c56
2 files changed, 57 insertions, 0 deletions
diff --git a/thermal_common.h b/thermal_common.h
index d67661a..8ffbc5c 100644
--- a/thermal_common.h
+++ b/thermal_common.h
@@ -39,6 +39,7 @@ enum therm_msm_id {
THERM_SDM_632,
THERM_SDM_439,
THERM_MSMNILE,
+ THERM_TALOS,
};
struct target_therm_cfg {
diff --git a/thermal_target.c b/thermal_target.c
index cce237e..bf3f0a5 100644
--- a/thermal_target.c
+++ b/thermal_target.c
@@ -58,6 +58,7 @@ static struct therm_msm_soc_type msm_soc_table[] = {
{THERM_SDM_630, 385},
{THERM_SDM_710, 336},
{THERM_SDM_710, 337},
+ {THERM_SDM_710, 393}, // This SOC ID is for SDM712
{THERM_QCS_605, 347},
{THERM_SDM_632, 349},
{THERM_SDM_632, 350},
@@ -68,8 +69,59 @@ static struct therm_msm_soc_type msm_soc_table[] = {
{THERM_MSMNILE, 339},
{THERM_MSMNILE, 362},
{THERM_MSMNILE, 367},
+ {THERM_TALOS, 355},
};
+static char *cpu_sensors_talos[] =
+{
+ "cpuss-2-usr",
+ "cpuss-2-usr",
+ "cpuss-1-usr",
+ "cpuss-1-usr",
+ "cpuss-0-usr",
+ "cpuss-0-usr",
+ "cpu-1-0-usr",
+ "cpu-1-2-usr",
+};
+
+static char *misc_sensors_talos[] =
+{
+ "gpu-usr",
+ "battery",
+ "xo-therm"
+};
+
+static struct target_therm_cfg sensor_cfg_talos[] = {
+ {
+ .type = DEVICE_TEMPERATURE_CPU,
+ .sensor_list = cpu_sensors_talos,
+ .sens_cnt = ARRAY_SIZE(cpu_sensors_talos),
+ .mult = 0.001,
+ },
+ {
+ .type = DEVICE_TEMPERATURE_GPU,
+ .sensor_list = &misc_sensors_talos[0],
+ .sens_cnt = 1,
+ .mult = 0.001,
+ .label = "GPU",
+ },
+ {
+ .type = DEVICE_TEMPERATURE_BATTERY,
+ .sensor_list = &misc_sensors_talos[1],
+ .sens_cnt = 1,
+ .mult = 0.001,
+ .label = "battery",
+ },
+ {
+ .type = DEVICE_TEMPERATURE_SKIN,
+ .sensor_list = &misc_sensors_talos[2],
+ .sens_cnt = 1,
+ .mult = 0.001,
+ .label = "skin",
+ }
+};
+
+
static char *cpu_sensors_msmnile[] =
{
"cpu-0-0-usr",
@@ -486,6 +538,10 @@ ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, size_t s
cfg = sensor_cfg_msmnile;
num_cfg = ARRAY_SIZE(sensor_cfg_msmnile);
break;
+ case THERM_TALOS:
+ cfg = sensor_cfg_talos;
+ num_cfg = ARRAY_SIZE(sensor_cfg_talos);
+ break;
default:
cfg = NULL;
num_cfg = 0;