mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
drivers: thermal: Change parameters in thermal zone configuration
Change trip threshold, trip clear, passive polling delay and algorithm type parameter name in the thermal zone configuration output to set_temp, clr_temp, passive_delay and algo_type from trip_threshold, trip_threshold_clr, passive_polling_delay and policy. Change-Id: I5d531eaf0990202b7a0537e1d3a2ed3b145543ab Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
This commit is contained in:
parent
c65a75e36e
commit
fe5065ca0a
2 changed files with 8 additions and 8 deletions
|
|
@ -156,7 +156,7 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr,
|
|||
if (!trip_buf_end)
|
||||
return -EINVAL;
|
||||
|
||||
temp_buf = strnstr(buf, "trip_threshold", count);
|
||||
temp_buf = strnstr(buf, "set_temp", count);
|
||||
if (!temp_buf)
|
||||
goto eval_device;
|
||||
if (!tz->ops->set_trip_temp)
|
||||
|
|
@ -166,7 +166,7 @@ static int parse_threshold(struct thermal_zone_device *tz, char *buf_ptr,
|
|||
if (!temp_buf_end)
|
||||
return -EINVAL;
|
||||
|
||||
hyst_buf = strnstr(buf, "trip_threshold_clr", count);
|
||||
hyst_buf = strnstr(buf, "clr_temp", count);
|
||||
if (hyst_buf) {
|
||||
if (!tz->ops->set_trip_hyst)
|
||||
return -EPERM;
|
||||
|
|
@ -257,7 +257,7 @@ static int parse_delay(struct thermal_zone_device *tz, char *buf,
|
|||
return -EINVAL;
|
||||
tz->polling_delay = delay;
|
||||
} else {
|
||||
if (sscanf(buf, "passive_polling_delay %d", &delay) != 1)
|
||||
if (sscanf(buf, "passive_delay %d", &delay) != 1)
|
||||
return -EINVAL;
|
||||
tz->passive_delay = delay;
|
||||
}
|
||||
|
|
@ -303,7 +303,7 @@ static int parse_config(struct thermal_zone_device *tz, char *buf_ptr,
|
|||
count = next_buf - curr_buf;
|
||||
else
|
||||
count = buf_end - curr_buf + 1;
|
||||
if (strnstr(curr_buf, "passive_polling_delay", count))
|
||||
if (strnstr(curr_buf, "passive_delay", count))
|
||||
ret = parse_delay(tz, curr_buf, count, false);
|
||||
else if (strnstr(curr_buf, "polling_delay", count))
|
||||
ret = parse_delay(tz, curr_buf, count, true);
|
||||
|
|
|
|||
|
|
@ -56,12 +56,12 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf)
|
|||
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "sensor %s\n",
|
||||
tz->type);
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "policy %s\n",
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset, "algo_type %s\n",
|
||||
tz->governor->name);
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
|
||||
"polling_delay %d\n", tz->polling_delay);
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
|
||||
"passive_polling_delay %d\n",
|
||||
"passive_delay %d\n",
|
||||
tz->passive_delay);
|
||||
if (!tz->trips || !tz->ops->get_trip_temp)
|
||||
return offset;
|
||||
|
|
@ -98,10 +98,10 @@ config_show(struct device *dev, struct device_attribute *attr, char *buf)
|
|||
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
|
||||
"trip %s\n", buf_trip);
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
|
||||
"trip_threshold %s\n", buf_temp);
|
||||
"set_temp %s\n", buf_temp);
|
||||
if (buf2_offset)
|
||||
offset += scnprintf(buf + offset, PAGE_SIZE - offset,
|
||||
"trip_threshold_clr %s\n", buf_hyst);
|
||||
"clr_temp %s\n", buf_hyst);
|
||||
|
||||
buf_size = 0;
|
||||
buf_offset = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue