aboutsummaryrefslogtreecommitdiff
path: root/thermal
diff options
context:
space:
mode:
authorDavide Garberi <dade.garberi@gmail.com>2022-08-08 01:05:16 +0200
committerDavide Garberi <dade.garberi@gmail.com>2022-08-16 12:21:37 +0200
commit9a7d684727fbd018e416bba63ee69cfdb9259391 (patch)
tree0040c2006929c663b95c24cf2edbf7fbfb92a20c /thermal
parenta87e3702a65f6dd2b0d0b2d319da809be440781a (diff)
msm8996-common: thermal: Nuke vr part
* We don't need this Change-Id: Id7f57dcb3c1e7b225d8c51c0718c018bb41dc8c1
Diffstat (limited to 'thermal')
-rw-r--r--thermal/thermal.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/thermal/thermal.c b/thermal/thermal.c
index 5b51673..9bef5b0 100644
--- a/thermal/thermal.c
+++ b/thermal/thermal.c
@@ -50,7 +50,6 @@ const int CPU_SENSORS[] = {4, 6, 9, 11};
// device/zuk/msm8996-common/configs/thermal-engine.conf
#define SKIN_THROTTLING_THRESHOLD 47
#define SKIN_SHUTDOWN_THRESHOLD 60
-#define VR_THROTTLED_BELOW_MIN 58
#define GPU_LABEL "GPU"
#define BATTERY_LABEL "battery"
@@ -73,8 +72,7 @@ const char *CPU_LABEL[] = {"CPU0", "CPU1", "CPU2", "CPU3"};
* @return 0 on success or negative value -errno on error.
*/
static ssize_t read_temperature(int sensor_num, int type, const char *name, float mult,
- float throttling_threshold, float shutdown_threshold, float vr_throttling_threshold,
- temperature_t *out) {
+ float throttling_threshold, float shutdown_threshold, temperature_t *out) {
FILE *file;
char file_name[MAX_LENGTH];
float temp;
@@ -98,8 +96,7 @@ static ssize_t read_temperature(int sensor_num, int type, const char *name, floa
.name = name,
.current_value = temp * mult,
.throttling_threshold = throttling_threshold,
- .shutdown_threshold = shutdown_threshold,
- .vr_throttling_threshold = vr_throttling_threshold
+ .shutdown_threshold = shutdown_threshold
};
return 0;
@@ -114,8 +111,7 @@ static ssize_t get_cpu_temperatures(temperature_t *list, size_t size) {
}
// tsens_tz_sensor[4,6,9,11]: temperature in decidegrees Celsius.
ssize_t result = read_temperature(CPU_SENSORS[cpu], DEVICE_TEMPERATURE_CPU, CPU_LABEL[cpu],
- 0.1, CPU_THROTTLING_THRESHOLD, CPU_SHUTDOWN_THRESHOLD, CPU_THROTTLING_THRESHOLD,
- &list[cpu]);
+ 0.1, CPU_THROTTLING_THRESHOLD, CPU_SHUTDOWN_THRESHOLD, &list[cpu]);
if (result != 0) {
return result;
}
@@ -141,8 +137,7 @@ static ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, s
if (current_index < size) {
// tsens_tz_sensor14: temperature in decidegrees Celsius.
result = read_temperature(GPU_SENSOR_NUM, DEVICE_TEMPERATURE_GPU, GPU_LABEL, 0.1,
- UNKNOWN_TEMPERATURE, UNKNOWN_TEMPERATURE, UNKNOWN_TEMPERATURE,
- &list[current_index]);
+ UNKNOWN_TEMPERATURE, UNKNOWN_TEMPERATURE, &list[current_index]);
if (result < 0) {
return result;
}
@@ -153,8 +148,7 @@ static ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, s
if (current_index < size) {
// tsens_tz_sensor29: battery: temperature in millidegrees Celsius.
result = read_temperature(BATTERY_SENSOR_NUM, DEVICE_TEMPERATURE_BATTERY, BATTERY_LABEL,
- 0.001, UNKNOWN_TEMPERATURE, BATTERY_SHUTDOWN_THRESHOLD, UNKNOWN_TEMPERATURE,
- &list[current_index]);
+ 0.001, UNKNOWN_TEMPERATURE, BATTERY_SHUTDOWN_THRESHOLD, &list[current_index]);
if (result < 0) {
return result;
}
@@ -165,8 +159,7 @@ static ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, s
if (current_index < size) {
// tsens_tz_sensor24: temperature in Celsius.
result = read_temperature(SKIN_SENSOR_NUM, DEVICE_TEMPERATURE_SKIN, SKIN_LABEL, 1.,
- SKIN_THROTTLING_THRESHOLD, SKIN_SHUTDOWN_THRESHOLD, VR_THROTTLED_BELOW_MIN,
- &list[current_index]);
+ SKIN_THROTTLING_THRESHOLD, SKIN_SHUTDOWN_THRESHOLD, &list[current_index]);
if (result < 0) {
return result;
}