diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-12-17 00:25:19 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2018-12-17 00:25:19 -0800 |
commit | 7b8be66a5aa82376bd931542d5a4d3f4e6c12637 (patch) | |
tree | 4bd742b58b3b379415e0316aa4b6563aad8c31b7 | |
parent | 7aa64e93a94250200207c12310861ec81b451d19 (diff) | |
parent | a625d46913978a2b9f0aee5571b4910aba732992 (diff) | |
download | android_hardware_qcom_thermal-7b8be66a5aa82376bd931542d5a4d3f4e6c12637.tar.gz android_hardware_qcom_thermal-7b8be66a5aa82376bd931542d5a4d3f4e6c12637.tar.bz2 android_hardware_qcom_thermal-7b8be66a5aa82376bd931542d5a4d3f4e6c12637.zip |
Merge a625d46913978a2b9f0aee5571b4910aba732992 on remote branch
Change-Id: I5198db5dc1589bd97bcbff8e6fae6721166ebf7a
-rw-r--r-- | thermal_common.h | 2 | ||||
-rw-r--r-- | thermal_target.c | 107 |
2 files changed, 109 insertions, 0 deletions
diff --git a/thermal_common.h b/thermal_common.h index 8ffbc5c..c76952e 100644 --- a/thermal_common.h +++ b/thermal_common.h @@ -40,6 +40,8 @@ enum therm_msm_id { THERM_SDM_439, THERM_MSMNILE, THERM_TALOS, + THERM_SDMMAGPIE, + THERM_MSM_8917, }; struct target_therm_cfg { diff --git a/thermal_target.c b/thermal_target.c index bf3f0a5..96d4921 100644 --- a/thermal_target.c +++ b/thermal_target.c @@ -70,6 +70,12 @@ static struct therm_msm_soc_type msm_soc_table[] = { {THERM_MSMNILE, 362}, {THERM_MSMNILE, 367}, {THERM_TALOS, 355}, + {THERM_SDMMAGPIE, 365}, + {THERM_MSM_8917, 303}, + {THERM_MSM_8917, 307}, + {THERM_MSM_8917, 308}, + {THERM_MSM_8917, 309}, + {THERM_MSM_8917, 386}, // This SOC ID is for QM215 }; static char *cpu_sensors_talos[] = @@ -121,6 +127,54 @@ static struct target_therm_cfg sensor_cfg_talos[] = { } }; +static char *cpu_sensors_sdmmagpie[] = +{ + "cpu-0-0-usr", + "cpu-0-1-usr", + "cpu-0-2-usr", + "cpu-0-3-usr", + "cpu-0-4-usr", + "cpu-0-5-usr", + "cpu-1-0-usr", + "cpu-1-2-usr", +}; + +static char *misc_sensors_sdmmagpie[] = +{ + "gpuss-0-usr", + "battery", + "xo-therm-adc" +}; + +static struct target_therm_cfg sensor_cfg_sdmmagpie[] = { + { + .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_sdmmagpie[0], + .sens_cnt = 1, + .mult = 0.001, + .label = "GPU", + }, + { + .type = DEVICE_TEMPERATURE_BATTERY, + .sensor_list = &misc_sensors_sdmmagpie[1], + .sens_cnt = 1, + .mult = 0.001, + .label = "battery", + }, + { + .type = DEVICE_TEMPERATURE_SKIN, + .sensor_list = &misc_sensors_sdmmagpie[2], + .sens_cnt = 1, + .mult = 0.001, + .label = "skin", + } +}; static char *cpu_sensors_msmnile[] = { @@ -459,6 +513,51 @@ static struct target_therm_cfg sensor_cfg_439[] = { } }; +static char *cpu_sensors_8917[] = +{ + "apc1-cpu0-usr", + "apc1-cpu1-usr", + "apc1-cpu2-usr", + "apc1-cpu3-usr", +}; + +static char *misc_sensors_8917[] = +{ + "gpu0-usr", + "battery", + "xo-therm-adc" +}; + +static struct target_therm_cfg sensor_cfg_8917[] = { + { + .type = DEVICE_TEMPERATURE_CPU, + .sensor_list = cpu_sensors_8917, + .sens_cnt = ARRAY_SIZE(cpu_sensors_8917), + .mult = 0.001, + }, + { + .type = DEVICE_TEMPERATURE_GPU, + .sensor_list = &misc_sensors_8917[0], + .sens_cnt = 1, + .mult = 0.001, + .label = "GPU", + }, + { + .type = DEVICE_TEMPERATURE_BATTERY, + .sensor_list = &misc_sensors_8917[1], + .sens_cnt = 1, + .mult = 0.001, + .label = "battery", + }, + { + .type = DEVICE_TEMPERATURE_SKIN, + .sensor_list = &misc_sensors_8917[2], + .sens_cnt = 1, + .mult = 0.001, + .label = "skin", + } +}; + static int get_soc_info(char *buf) { int ret = 0; @@ -534,6 +633,10 @@ ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, size_t s cfg = sensor_cfg_439; num_cfg = ARRAY_SIZE(sensor_cfg_439); break; + case THERM_MSM_8917: + cfg = sensor_cfg_8917; + num_cfg = ARRAY_SIZE(sensor_cfg_8917); + break; case THERM_MSMNILE: cfg = sensor_cfg_msmnile; num_cfg = ARRAY_SIZE(sensor_cfg_msmnile); @@ -542,6 +645,10 @@ ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, size_t s cfg = sensor_cfg_talos; num_cfg = ARRAY_SIZE(sensor_cfg_talos); break; + case THERM_SDMMAGPIE: + cfg = sensor_cfg_sdmmagpie; + num_cfg = ARRAY_SIZE(sensor_cfg_sdmmagpie); + break; default: cfg = NULL; num_cfg = 0; |